From 101793286959d1113af940727b5c6e2101ac2303 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Tue, 27 Oct 2020 22:43:26 +0000 Subject: [PATCH] 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 --- reference/filesystem/functions/popen.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reference/filesystem/functions/popen.xml b/reference/filesystem/functions/popen.xml index c2b7277ed0..eb51722bd8 100644 --- a/reference/filesystem/functions/popen.xml +++ b/reference/filesystem/functions/popen.xml @@ -35,7 +35,14 @@ mode - The mode + The mode. Either 'r' for reading, or 'w' + for writing. + + + On Windows, popen defaults to text mode, i.e. any \n + characters written to or read from the pipe will be translated to \r\n. + If this is not desired, binaray mode can be enforced by setting mode + to 'rb' and 'wb', respectively.