#44020 [NEW]: "php -l" exit code
| From: | root at mantoru dot de | Date: | Sat, 02 Feb 2008 01:30:57 +0000 |
| Subject: | #44020 [NEW]: "php -l" exit code | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-495@lists.php.net to get a copy of this message | ||
From: root at mantoru dot de
Operating system: Windows XP
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: "php -l" exit code
Description:
------------
http://php.net/features.commandline
php -l: "On success [...] the shell return code is 0. On failure, [...]
the shell return code is set to 255."
This doesn't seem to be true, at least not on Windows.
Reproduce code:
---------------
C:\> ver
Microsoft Windows XP [Version 5.1.2600]
C:\> cd\php5\scripts
C:\php5\scripts> type victim.php
<?php if {"";?>
C:\php5\scripts> php -d error_reporting=0 -l victim.php
Errors parsing victim.php
C:\php5\scripts> echo %ERRORLEVEL%
Expected result:
----------------
255
Actual result:
--------------
-1
--
Edit bug report at http://bugs.php.net/?id=44020&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44020&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44020&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44020&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44020&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44020&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44020&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44020&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44020&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44020&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44020&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44020&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44020&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44020&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44020&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44020&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=44020&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44020&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44020&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44020&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44020&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44020&r=mysqlcfg