PHP get_resource_type() Function

PHP get_resource_type Function


Definition and Usage

The get_resource_type() function returns the type of a resource.

Syntax

string get_resource_type ( resource $handle )

Parameters


If the given handle is a resource, this function will return a string representing its type.Return Values

  • If the type is not identified by this function, the return value will be the string Unknown.

  • This function will return null and generate an error if handle is not a resource.