PHP/resource
< PHP
Jump to navigation
Jump to search
About
In PHP, a "resource" value is an opaque internal pointer for handling certain types of I/O-ish operations. As of PHP 8.5, although "resource" is "soft-reserved and is used as a documentation pseudotype, there is no actual "resource" type; the only type which is currently known to be compatible with resource variables is "mixed". PHP currently interprets invocation of "resource" as a type as a reference to an unknown class named "<current namespace>\resource".
Note that additional stream resource types can be defined in code with stream_wrapper_register().