PHP is migrating away from `resource` type, replacing it with opaque (i.e. no userland-visible methods or properties) classes. This means that code like this will break:
```lang=php
$curl = curl_init( 'http://example.com' );
if ( !is_resource( $curl ) ) {
die( 'Something horrible happened' );
}
```
It will always report errors because
```
>>> var_dump( $curl );
object(CurlHandle)#1 (0) {
}
```
Instead, return values should be used like this:
```lang=php
if ( !$curl ) { ... }
```
or
```lang=php
if ( $curl === false ) { ... }
```
The current progress of PHP's migration can be tracked [[ https://github.com/php/php-tasks/issues/6 | here ]]. As of PHP 8.0 feature freeze, the following extensions have been migrated:
* curl
* openssl
* shmop
* sockets
* sysvmsg
* sysvsem
* sysvshm
* xmlrpc
* zip
* zlib
The rest will be done in 8.1 or later, but to avoid having another pass at it and make the code more future-proof, all uses of `is_resource()` should be removed.