Polyfill for get_resource_id()
nicolas-grekas opened this issue · comments
Nicolas Grekas commented
As described in php/php-src#5427
Anyone up to give it a try?
Be careful: we must also polyfill the behavior when a non-resource is passed (I don't know the behavior, it might be a warning or an exception - to be investigated).
Christophe Coevoet commented
@nikic as you implemented the function, can you tell us what happens when passing something else than a resource ? Do we get a TypeError, a warning+false
, something else ?
Nikita Popov commented
@stof As with all functions in PHP 8, a TypeError is thrown.