Returns active resources
Syntax
get_resources(?string $type = null): array
Parameters
type
If defined, this will cause get_resources() to only return resources of the given type.
If the string Unknown is provided as the type, then only resources that are of an unknown type will be returned.
If omitted, all resources will be returned.
Return
Returns an array of currently active resources, indexed by resource number.
Examples
1 · void
<? $return = get_resources(); var_dump($return); ?>
array(1) { [1]=> resource(1) of type (stream) }
2 · type · defined
<? $type = "stream"; $return = get_resources($type); var_dump($return); ?>
array(1) { [1]=> resource(1) of type (stream) }
3 · type · Unknown
<? $type = "Unknown"; $return = get_resources($type); var_dump($return); ?>
array(0) { }