= 4.0.2, PHP 5, PHP 7 Syntax string get_resource_type ( resource" />
English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
get_resource_type() Returns the type of the resource (resource).
Version Required: PHP 4 >= 4.0.2, PHP 5, PHP 7
string get_resource_type ( resource $handle )
Parameter Description:
This function returns a string representing the type of the resource passed to it. An error will occur if the parameter is not a valid resource.
<?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 ?>