get_resource_type() returns the resource type.
Version requirements: PHP 4 >= 4.0.2, PHP 5, PHP 7
grammar
string get_resource_type ( resource $handle )
Parameter description:
$handle: handle.
return value
This function returns a string representing the type of resource passed to it. If the parameter is not a legal resource, an error will occur.
Example
Example
<?php $c = mysql_connect ( ) ; echo get_resource_type ( $c ) .PHP_EOL ; // Print:
mysql link $fp = fopen ( " foo " , " w " ) ; echo get_resource_type ( $fp ) .PHP_EOL ; // Print : file $doc = new_xmldoc ( " 1.0 " ) ; echo get_resource_type ( $doc -> doc ) .PHP_EOL ; // Print
: domxml document ?>