Posted by PHPVote 5 years ago
here another idea for PHP 6 the simply means removing the datatype "resource" because and convert current resources into classes/objects as it's already done with GMP.
Because resources are simply a pointer to a somewhere described data structure - resources are the exactly the use case for objects.
To be bc current resources should be instances of an interface "Resource" and the function "is_resource" would work similar as "$resource instanceof Resource".
I haven't enough knowledge about the internals but couldn't that be implemented in a bc way by changing resource macros to handle objects?