symfony / polyfill

PHP polyfills

Home Page:https://symfony.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polyfill for get_resource_id()

nicolas-grekas opened this issue · comments

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).

@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 ?

@stof As with all functions in PHP 8, a TypeError is thrown.