note 97565 added to language.types.resource
| From: | SoosGergely at osu1 dot php dot net | Date: | Mon, 26 Apr 2010 12:24:40 +0000 |
| Subject: | note 97565 added to language.types.resource | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168644@lists.php.net to get a copy of this message | ||
It is always wrong to assume that some operation, like casting to a resource makes no sense. People
will always find some extreme case where it would be useful; like the previous example with mysql.
My problem was that I wanted to start daemons from a web interface but the apache filehandles were
inherited which caused that apache was unable to restart. If I could only typecast a number to a
filehandle and then close it... Instead I had to write a small C program that closes every
filehandle and then starts my program. I surely miss Apache2::SubProcess from perl. (Also, in perl
you can reopen a file and then close it using IO::Handle module's fdopen. I'm just
saying.)
----
Server IP: 69.147.83.197
Probable Submitter: 82.79.50.10
----
Manual Page -- http://www.php.net/manual/en/language.types.resource.php
Edit -- https://master.php.net/note/edit/97565
Del: integrated -- https://master.php.net/note/delete/97565/integrated
Del: useless -- https://master.php.net/note/delete/97565/useless
Del: bad code -- https://master.php.net/note/delete/97565/bad+code
Del: spam -- https://master.php.net/note/delete/97565/spam
Del: non-english -- https://master.php.net/note/delete/97565/non-english
Del: in docs -- https://master.php.net/note/delete/97565/in+docs
Del: other reasons-- https://master.php.net/note/delete/97565
Reject -- https://master.php.net/note/reject/97565
Search -- https://master.php.net/manage/user-notes.php