newer PHP version only accept real resources in userland