note 97565 deleted from language.types.resource by googleguy
| From: | googleguy@php.net | Date: | Fri, 11 Jan 2013 09:32:19 +0000 |
| Subject: | note 97565 deleted from language.types.resource by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192917@lists.php.net to get a copy of this message | ||
Note Submitter: Soos Gergely
----
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.)