diff --git a/appendices/wrappers.xml b/appendices/wrappers.xml index 217d9923b1..e6e5874980 100644 --- a/appendices/wrappers.xml +++ b/appendices/wrappers.xml @@ -1,5 +1,5 @@ - + List of Supported Protocols/Wrappers @@ -603,11 +603,6 @@ X-MyCustomHeader: Foo
PHP input/output streams - - PHP 3.0.13 and up, php://output - and php://input since PHP 4.3.0, - php://filter since PHP 5.0.0. - php://stdin @@ -615,7 +610,9 @@ X-MyCustomHeader: Foo php://stderr php://output php://input - php://filter + php://filter (available since PHP 5.0.0) + php://memory (available since PHP 5.1.0) + php://temp (available since PHP 5.1.0) @@ -730,6 +727,44 @@ file_put_contents("php://filter/write=string.rot13/resource=example.txt","Hello + + + The php://memory wrapper stores the data in the + memory. php://temp behaves similarly, but uses a + temporary file for storing the data when a certain memory limit is reached + (the default is 2 MB). + + + The php://temp wrapper takes the following + 'parameters' as parts of its 'path': + + + + + /maxmemory:<number of bytes> + (optional). This parameter allows changing the + default value for the memory limit (when the data is moved to a temporary + file). + + + +]]> + + + + + + @@ -751,33 +786,45 @@ file_put_contents("php://filter/write=string.rot13/resource=example.txt","Hello <row> <entry>Allows Reading</entry> <entry> - <literal>php://stdin</literal> and - <literal>php://input</literal> only. + <literal>php://stdin</literal>, + <literal>php://input</literal>, + <literal>php://memory</literal> and + <literal>php://temp</literal> only. </entry> </row> <row> <entry>Allows Writing</entry> <entry> <literal>php://stdout</literal>, - <literal>php://stderr</literal>, and - <literal>php://output</literal> only. + <literal>php://stderr</literal>, + <literal>php://output</literal>, + <literal>php://memory</literal> and + <literal>php://temp</literal> only. </entry> </row> <row> <entry>Allows Appending</entry> <entry> <literal>php://stdout</literal>, - <literal>php://stderr</literal>, and - <literal>php://output</literal> only. (Equivalent to writing) + <literal>php://stderr</literal>, + <literal>php://output</literal>, + <literal>php://memory</literal> and + <literal>php://temp</literal> only. (Equivalent to writing) </entry> </row> <row> <entry>Allows Simultaneous Reading and Writing</entry> - <entry>No. These wrappers are unidirectional.</entry> + <entry> + <literal>php://memory</literal> and + <literal>php://temp</literal> only. + </entry> </row> <row> <entry>Supports <function>stat</function></entry> - <entry>No</entry> + <entry> + <literal>php://memory</literal> and + <literal>php://temp</literal> only. + </entry> </row> <row> <entry>Supports <function>unlink</function></entry>