On Sep 24, 2014 10:19 AM, "Michael Wallner" <m...@php.net> wrote: > > 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. >
I also wonder why we still need them. Doing what has been done with gmp for all resources would be a good move for 7.