HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

get_resources

Description

The get_resources of Options / Information for PHP 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();

print_r($return);
Array
(
    [1] => Resource id #1
)

2 · type · defined

<?

$type = "stream";

$return = get_resources($type);

print_r($return);
Array
(
    [1] => Resource id #1
)

3 · type · Unknown

<?

$type = "Unknown";

$return = get_resources($type);

print_r($return);
Array
(
)