YouTip LogoYouTip

Php Is_Resource Function

# PHP is_resource() Function [![Image 3: PHP Available Functions](#)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... [![Image 4: PHP Available Functions](#)PHP Available Functions](#)
← Php Print_R FunctionPhp Is_Int Function β†’