note 130506 added to function.is-resource
| From: | office@autoframe.ro | Date: | Sun, 12 Oct 2025 08:49:04 +0000 |
| Subject: | note 130506 added to function.is-resource | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-222376@lists.php.net to get a copy of this message | ||
//How to check the resource state
$res = fopen('https://www.google.com',
'r');
echo $typeOpened = gettype($res); // "resource"
fclose($res);
echo $typeClosed = gettype($res); // "resource (closed)" as of PHP 7.2.0
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 188.27.43.247)
----
Manual Page -- https://php.net/manual/en/function.is-resource.php
Edit -- https://main.php.net/note/edit/130506
Del: integrated -- https://main.php.net/note/delete/130506/integrated
Del: useless -- https://main.php.net/note/delete/130506/useless
Del: bad code -- https://main.php.net/note/delete/130506/bad+code
Del: spam -- https://main.php.net/note/delete/130506/spam
Del: non-english -- https://main.php.net/note/delete/130506/non-english
Del: in docs -- https://main.php.net/note/delete/130506/in+docs
Del: other reasons-- https://main.php.net/note/delete/130506
Reject -- https://main.php.net/note/reject/130506
Search -- https://main.php.net/manage/user-notes.php