I'm surprised that is_resource() returns false for resource objects, does anyone knows why it wouldn't return true in such case ?
This is a very weird behavior, I'd expect it to return true, moreover this is the most annoying detail of this BC break, in my opinion.
I have lots of code using is_resource() but I usually don't bother checking for type (maybe I'm doing it wrong). But I'd also expect get_resource_type() to be deprecated somehow and return backward-compatible values for converted resources to objects.
Right, having is_resource return true for resourcey objects would have prevented all resource-related errors I ran into with php8.0 migration I believe. That'd be a welcome improvement/fix for 8.1.
Best,
Jordi
--
Jordi Boggiano
@seldaek - https://seld.be