note 112612 added to language.types.intro
| From: | Shoei | Date: | Thu, 04 Jul 2013 13:52:21 +0000 |
| Subject: | note 112612 added to language.types.intro | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195458@lists.php.net to get a copy of this message | ||
There is the rather obscure situation of a resource type var which has been disconnected from the
resource it represents. Example:
<?php
$foo = opendir('.');
closedir($foo);
?>
After closedir(), gettype() for $foo returns "unknown type", var_dump() returns
"resource(N) of type (Unknown)", and all the is_...() functions (including is_resource())
return false. If you convert this "unknown" variable to something else, you get the same
result as when it was a valid resource; but you can't convert it to a resource, you get a
warning and it remains "unknown".
----
Server IP: 69.147.83.199
Probable Submitter: 212.227.35.137
----
Manual Page -- http://php.net/manual/en/language.types.intro.php
Edit -- https://master.php.net/note/edit/112612
Del: integrated -- https://master.php.net/note/delete/112612/integrated
Del: useless -- https://master.php.net/note/delete/112612/useless
Del: bad code -- https://master.php.net/note/delete/112612/bad+code
Del: spam -- https://master.php.net/note/delete/112612/spam
Del: non-english -- https://master.php.net/note/delete/112612/non-english
Del: in docs -- https://master.php.net/note/delete/112612/in+docs
Del: other reasons-- https://master.php.net/note/delete/112612
Reject -- https://master.php.net/note/reject/112612
Search -- https://master.php.net/manage/user-notes.php