GET_RESOURCE_TYPE(3) 1 GET_RESOURCE_TYPE(3)
get_resource_type - Returns the resource type
SYNOPSIS
string get_resource_type (resource $handle)
DESCRIPTION
This function gets the type of the given resource.
PARAMETERS
o $handle
- The evaluated resource handle.
RETURN VALUES
If the given $handle is a resource, this function will return a string representing its type. If the type is not identified by this func-
tion, the return value will be the string Unknown.
This function will return FALSE and generate an error if $handle is not a resource.
EXAMPLES
Example #1
get_resource_type(3) example
<?php
// prints: mysql link
$c = mysql_connect();
echo get_resource_type($c) . "
";
// prints: stream
$fp = fopen("foo", "w");
echo get_resource_type($fp) . "
";
// prints: domxml document
$doc = new_xmldoc("1.0");
echo get_resource_type($doc->doc) . "
";
?>
PHP Documentation Group GET_RESOURCE_TYPE(3)