For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > October 2006 > cvs: phpdoc /en/appendices wrappers.xml









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /en/appendices wrappers.xml
Wez Furlong

2006-10-21, 6:57 pm

wez Sat Oct 21 22:45:08 2006 UTC

Modified files:
/phpdoc/en/appendices wrappers.xml
Log:
add note about open/close semantics for php://stdin and friends

http://cvs.php.net/viewvc.cgi/phpdo...6&diff_format=u
Index: phpdoc/en/appendices/wrappers.xml
diff -u phpdoc/en/appendices/wrappers.xml:1.65 phpdoc/en/appendices/wrappers.xml:1.66
--- phpdoc/en/appendices/wrappers.xml:1.65 Fri Sep 22 17:05:11 2006
+++ phpdoc/en/appendices/wrappers.xml Sat Oct 21 22:45:08 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.65 $ -->
+<!-- $Revision: 1.66 $ -->
<appendix id="wrappers">
<title>List of Supported Protocols/Wrappers</title>
<para>
@@ -618,7 +618,15 @@
<simpara>
<filename>php://stdin</filename>, <filename>php://stdout</filename>
and <filename>php://stderr</filename> allow access to
- the corresponding input or output stream of the PHP process.
+ the corresponding input or output stream of the PHP process. The stream
+ references a duplicate file descriptor, so if you open
+ <filename>php://stdin</filename> and later close it, you close only your
+ copy of the descriptor--the actual stream referenced by
+ <constant>STDIN</constant> is unaffected. Note that PHP exhibited buggy
+ behavior in this regard until PHP 5.2.1. It is recommended that you simply
+ use the constants <constant>STDIN</constant>, <constant>STDOUT</constant>
+ and <constant>STDERR</constant> instead of manually opening streams using
+ these wrappers.
</simpara>
<simpara>
<filename>php://output</filename> allows you to write to the
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com