Bug #71670 [Opn->Ctl]: $argi & $argn is changed from php5.
| From: | seander@php.net | Date: | Sun, 13 Mar 2016 03:25:53 +0000 |
| Subject: | Bug #71670 [Opn->Ctl]: $argi & $argn is changed from php5. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199786@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71670&edit=1
ID: 71670
Updated by: seander@php.net
Reported by: karo+php at karonori dot com
Summary: $argi & $argn is changed from php5.
-Status: Open
+Status: Critical
Type: Bug
Package: CGI/CLI related
Operating System: linux
PHP Version: 7.0.3
-Assigned To:
+Assigned To: seander
Block user comment: N
Private report: N
New Comment:
Thanks for reporting this!
I opened a PR for this bug over at https://bugs.php.net/bug.php?id=71624, if you have
time mind confirming it fixes your issue?
thank you!
Previous Comments:
------------------------------------------------------------------------
[2016-02-26 07:03:52] karo+php at karonori dot com
Description:
------------
On php7, $argi & $argn is changed from php5.
Is the intended change?
% echo 12 | ./php-7.0.3/sapi/cli/php -R 'echo $argi, PHP_EOL;'
0
% echo 12 | ./php-7.0.3/sapi/cli/php -R 'echo $argn, PHP_EOL;'
1
Or do I use any alternate variables?
On php5, I think that $argi & $argn is correct.
% echo 12 | ./php-5.6.18/sapi/cli/php -R 'echo $argi, PHP_EOL;'
1
% echo 12 | ./php-5.6.18/sapi/cli/php -R 'echo $argn, PHP_EOL;'
12
Expected result:
----------------
% echo 12 | ./php-7.0.3/sapi/cli/php -R 'echo $argi, PHP_EOL;'
1
% echo 12 | ./php-7.0.3/sapi/cli/php -R 'echo $argn, PHP_EOL;'
12
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71670&edit=1