Query: is_resource
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IS_RESOURCE(3) 1 IS_RESOURCE(3) is_resource - Finds whether a variable is a resourceSYNOPSISbool is_resource (mixed $var)DESCRIPTIONFinds whether the given variable is a resource.PARAMETERSo $var - The variable being evaluated.RETURN VALUESReturns TRUE if $var is a resource, FALSE otherwise.EXAMPLESExample #1 is_resource(3) example <?php $db_link = @mysql_connect('localhost', 'mysql_user', 'mysql_pass'); if (!is_resource($db_link)) { die('Can't connect : ' . mysql_error()); } ?>NOTESNote is_resource(3) is not a strict type-checking method: it will return FALSE if $var is a resource variable that has been closed.SEE ALSOThe resource-type documentation, get_resource_type(3). PHP Documentation Group IS_RESOURCE(3)
Related Man Pages |
---|
is_numeric(3) - php |
is_object(3) - php |
is_int(3) - php |
empty(3) - php |
mysql_close(3) - php |