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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: karo+php at karonori dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC