php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71670 $argi & $argn is changed from php5.
Submitted: 2016-02-26 07:03 UTC Modified: 2016-03-13 03:27 UTC
From: karo+php at karonori dot com Assigned: seander (profile)
Status: Closed Package: CGI/CLI related
PHP Version: 7.0.3 OS: linux
Private report: No CVE-ID: None
 [2016-02-26 07:03 UTC] 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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-13 03:25 UTC] seander@php.net
-Status: Open +Status: Critical -Assigned To: +Assigned To: seander
 [2016-03-13 03:25 UTC] seander@php.net
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!
 [2016-03-13 03:27 UTC] seander@php.net
-Status: Critical +Status: Closed
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 23 19:01:25 2021 UTC