Php Is_Resource Function
# PHP is_resource() Function
[PHP Available Functions](#)
The **is_resource()** function is used to check whether a variable is of the resource type.
PHP Version Requirement: PHP 4, PHP 5, PHP 7
### Syntax
bool is_resource ( mixed $var )
Parameter Description:
* $var: The variable to check.
### Return Value
Returns TRUE if the specified variable is of type resource, otherwise returns FALSE.
### Example
In the following example, you need to create a demo.txt file in the current directory.
## Example
The output is:
File opened successfully...
[PHP Available Functions](#)
YouTip