ID:               45667
 User updated by:  ydeg71 at tiscali dot it
 Reported By:      ydeg71 at tiscali dot it
 Status:           Open
 Bug Type:         Arrays related
 Operating System: Linux
 PHP Version:      5.2.6
 New Comment:

Forget the isset(). *Any* reference to argv[] triggers the error.
Wondering how the heck I'm gonna check for command line arguments.


Previous Comments:
------------------------------------------------------------------------

[2008-07-31 16:41:54] ydeg71 at tiscali dot it

Description:
------------
Using isset() on argv[1] from the CLI results in error message
referring to the "?:" operator.

Reproduce code:
---------------
<? if (isset(argv[1])) echo "it's set"; ?>

Expected result:
----------------
Either nothing or the "it's set" string output on STDOUT

Actual result:
--------------
PHP Parse error:  syntax error, unexpected '[', expecting
T_PAAMAYIM_NEKUDOTAYIM in /home/ydeg/- on line 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45667&edit=1

Reply via email to