add note about open/close semantics for php://stdin and friends

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@222202 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Wez Furlong 2006-10-21 22:45:08 +00:00
parent c4c26a1403
commit 553bc8304a

View file

@ -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 @@ X-MyCustomHeader: Foo
<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