|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: karo+php at karonori dot com
New email:
PHP Version: OS:


 [2016-02-26 07:03 UTC] karo+php at karonori dot com
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;'
% echo 12 | ./php-7.0.3/sapi/cli/php -R 'echo $argn, PHP_EOL;'

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;'
% echo 12 | ./php-5.6.18/sapi/cli/php -R 'echo $argn, PHP_EOL;'

Expected result:
% echo 12 | ./php-7.0.3/sapi/cli/php -R 'echo $argi, PHP_EOL;'
% echo 12 | ./php-7.0.3/sapi/cli/php -R 'echo $argn, PHP_EOL;'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-13 03:25 UTC]
-Status: Open +Status: Critical -Assigned To: +Assigned To: seander
 [2016-03-13 03:25 UTC]
Thanks for reporting this!

I opened a PR for this bug over at, if you have time mind confirming it fixes your issue?

thank you!
 [2016-03-13 03:27 UTC]
-Status: Critical +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 23 19:01:25 2021 UTC