|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-03-13 03:23 UTC] seander@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: seander
[2016-03-13 03:23 UTC] seander@php.net
[2016-03-15 06:12 UTC] ab@php.net
[2016-03-15 06:12 UTC] ab@php.net
-Status: Assigned
+Status: Closed
[2016-07-20 11:32 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
Description: ------------ It looks like between 5.6 and 7.0 somebody broke the CLI utility's `-R` option. Specifically: * $argi is always 0 * $argn always has the last character cut off I've confirmed it works as expected in PHP 5.6.14 on OS X, whilst it's broken in 7.0.2 on OS X and master on Ubuntu. I'm not very good at C, so i don't have a patch, i'm sorry. Test script: --------------- % php -R 'echo "${argi}\n";' <<< $'foo\nbar' % php -R 'echo "${argn}\n";' <<< $'foo\nbar' Expected result: ---------------- % php --version | head -1 PHP 5.6.14 (cli) (built: Oct 3 2015 14:54:13) % php -R 'echo "${argi}\n";' <<< $'foo\nbar' 1 2 % php -R 'echo "${argn}\n";' <<< $'foo\nbar' foo bar Actual result: -------------- % php --version | head -1 PHP 7.0.2 (cli) (built: Jan 7 2016 10:40:26) ( NTS ) proserpina:php % php -R 'echo "${argi}\n";' <<< $'foo\nbar' 0 0 proserpina:php % php -R 'echo "${argn}\n";' <<< $'foo\nbar' fo ba