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/phpdoc/en/appendices/wrappers.xml?r1=1.65&r2=1.66&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

Reply via email to