[php6] OOP resources

From: Date: Fri, 21 Feb 2014 20:07:26 +0000
Subject: [php6] OOP resources
Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi,

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?

Thoughts,
Marc


Thread (10 messages)

« previous php.internals (#72748) next »