note 7619 added to is_resource
| From: | ccjeagle at ms6 dot hinet dot net | Date: | Wed, 09 Aug 2000 02:15:21 +0000 |
| Subject: | note 7619 added to is_resource | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-725@lists.php.net to get a copy of this message | ||
// A simple example:
$fp = fopen("my.txt","r") ;
echo gettype($fp) ;
print is_resource($fp) ? "TRUE" : "FALSE" ;
fclose($fp) ;
// Another example
$fp = fopen("my.txt","r") ;
fclose($fp) ;
echo gettype($fp) ;
print is_resource($fp) ? "TRUE" : "FALSE" ;
Both return "resource" and "TRUE".
http://www.php.net/manual/function.is-resource.php