On 24/09/14 08:30, Stas Malyshev wrote:
> Hi!
> 
>> Well, then let's remove this restriction from resources, too.
> 
> Not sure what use would it be for resources - resource IDs are not
> controlled by user code and for all intents and purposes are opaque
> numbers, which also do not have to be unique over the life of the
> script. What use would it be to index by those, especially by implicit
> convert? I don't think right now we have implicit convert of resources
> to ints anywhere, like we do have with __toString.
> 

There's currently no way to associate any data with a resource, except
by its ID.

$context[(int) $resource] = ...;

IIRC resources *were* implicitely converted to integers up until a
specific version, I'll have to look that up in history, though.

-- 
Regards,
Mike

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to