get_resources
get_resources
Returns active resources
array **get_resources** $type
Returns an array of all currently active s, optionally
filtered by resource type.
resource
Opmerking: > This function is meant for debugging and testing purposes. It is not supposed to be used in production environments, especially not to access or even manipulate resources which are normally not accessible (e.g. the underlying stream resource of instances).
SplFileObject
type
If defined, this will cause to only
return resources of the given type.
`get_resources`A list of resource types is available.
If the is provided as
the type, then only resources that are of an unknown type will be
returned.
`string``Unknown`
If omitted, all resources will be returned.
Returns an of currently active resources, indexed by
resource number.
array
**Voorbeeld: Unfiltered **
<?php
$fp = tmpfile();
var_dump(get_resources());
?>
array(1) {
[1]=>
resource(1) of type (stream)
}
**Voorbeeld: Filtered **
<?php
$fp = tmpfile();
var_dump(get_resources('stream'));
var_dump(get_resources('curl'));
?>
array(1) {
[1]=>
resource(1) of type (stream)
}
array(0) {
}
get_loaded_extensions``get_defined_constants``get_defined_functions``get_defined_vars