Re: [PHP-DEV] [RFC] [Vote] Resource to object conversion
Hi Kamil, Good question... After the workaround, I think there's less reason to do the conversion in the next major version indeed. To be honest, I am not able to recall any use-case where a real BC break could happen. I mean, there is a very tiny one where resources can be casted to integers, while objects by default cannot be, but this problem is also easily solvable (and Nikita had to do it for CurlHandle in the past), so I don't have any other idea. In my opinion, the main argument for converting stream resources to objects in a major version is the "marketing value" of this achievement and possibly the unintended side-effects/edge cases which we don't yet foresee. Regards, Máté
Re: [PHP-DEV] [RFC] [Vote] Resource to object conversion
Hi Máté, I have one question. If the primary stream resources get the is_resource hack, what hampers the changes from landing in a minor version? I'd assume that the migration would be mostly seamless. Is it the get_resource_type checks? Is it because is_resource also checks whether the resource is closed? Regards, Kamil -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php
[PHP-DEV] [RFC] [Vote] Resource to object conversion
Hi Everyone, As mentioned a few days ago, I've just opened the vote about resource to object conversion. The vote will be open for 2 weeks. RFC link: https://wiki.php.net/rfc/resource_to_object_conversion Discussion thread: https://externals.io/message/121660 Regards, Máté