is_resource
is_resource
Finds whether a variable is a resource
bool **is_resource** mixed $value
Finds whether the given variable is a .
resource
valueThe variable being evaluated.
Returns true if is a ,
false otherwise.
value``resource
Voorbeeld: example
<?php
$handle = fopen("php://stdout", "w");
if (is_resource($handle)) {
echo '$handle is a resource';
}
?>
$handle is a resource
Opmerking: > is not a strict type-checking method: it will return false if is a resource variable that has been closed.
is_resource``value
The resource-type documentationget_resource_type