Bug #71670 [NEW]: $argi & $argn is changed from php5.

From: Date: Fri, 26 Feb 2016 07:03:56 +0000
Subject: Bug #71670 [NEW]: $argi & $argn is changed from php5.
Groups: php.bugs php.bugs 
Request: Send a blank email to php-bugs+get-199483@lists.php.net to get a copy of this message
From:             karo+php at karonori dot com
Operating system: linux
PHP version:      7.0.3
Package:          CGI/CLI related
Bug Type:         Bug
Bug description:$argi & $argn is changed from php5.

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 bug report at https://bugs.php.net/bug.php?id=71670&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71670&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71670&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71670&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71670&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71670&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71670&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71670&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71670&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71670&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71670&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71670&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71670&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71670&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71670&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71670&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71670&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71670&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71670&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71670&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71670&r=mysqlcfg



Thread (1 message)

  • karo+php at karonori dot com
« previous php.bugs (#199483) next »