#44020 [Opn->Csd]: "php -l" exit code

From: Date: Fri, 07 Nov 2008 13:11:48 +0000
Subject: #44020 [Opn->Csd]: "php -l" exit code
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1440@lists.php.net to get a copy of this message
ID: 44020 Updated by: vrana@php.net Reported By: root at mantoru dot de -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Windows XP PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. It is PHP internal's FAILURE which is defined to -1. Previous Comments: ------------------------------------------------------------------------ [2008-02-02 01:30:57] root at mantoru dot de 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 this bug report at http://bugs.php.net/?id=44020&edit=1

« previous php.doc.bugs (#1440) next »