From 553bc8304ab569fd9b955b4fa732fa1bc0a4cffb Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 21 Oct 2006 22:45:08 +0000 Subject: [PATCH] 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 --- appendices/wrappers.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/appendices/wrappers.xml b/appendices/wrappers.xml index e6e5874980..4d6eb3e899 100644 --- a/appendices/wrappers.xml +++ b/appendices/wrappers.xml @@ -1,5 +1,5 @@ - + List of Supported Protocols/Wrappers @@ -618,7 +618,15 @@ X-MyCustomHeader: Foo php://stdin, php://stdout and php://stderr 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 + php://stdin and later close it, you close only your + copy of the descriptor--the actual stream referenced by + STDIN 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 STDIN, STDOUT + and STDERR instead of manually opening streams using + these wrappers. php://output allows you to write to the