Fix #80282: cannot send binary data to popen

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351021 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2020-10-27 22:43:26 +00:00
parent 33301d17ba
commit 1017932869

View file

@ -35,7 +35,14 @@
<term><parameter>mode</parameter></term>
<listitem>
<para>
The mode
The mode. Either <literal>'r'</literal> for reading, or <literal>'w'</literal>
for writing.
</para>
<para>
On Windows, <function>popen</function> defaults to text mode, i.e. any <literal>\n</literal>
characters written to or read from the pipe will be translated to <literal>\r\n</literal>.
If this is not desired, binaray mode can be enforced by setting <parameter>mode</parameter>
to <literal>'rb'</literal> and <literal>'wb'</literal>, respectively.
</para>
</listitem>
</varlistentry>