On Mon, Nov 10, 2008 at 11:10, Jakub Vrana <[EMAIL PROTECTED]> wrote:
>> Not true:
>> $ php -l t.php; echo $?
>
>> Parse error: syntax error, unexpected $end in t.php on line 3
>> Errors parsing t.php
>> 255
>
> In which PHP version and in which OS? Because in
> http://lxr.php.net/ident?i=php_lint_script I see FAILURE and in
> http://lxr.php.net/ident?i=FAILURE I see -1 which is the number that
> PHP 5.2.6 under Windows really returns.

I'm running Linux, Ubuntu, and FreeBSD.

Your reading of the code is correct, however:
"The value of status may be 0, EXIT_SUCCESS, EXIT_FAILURE,  or any other
value,  though  only  the  least  significant 8 bits (that is, status &
0377) shall be available to a waiting parent process."

The same rules apply to the userland exit() function.

Maybe we should fix the exist status here, manually setting it to 255
in the else clause of php_cli.c:1138?

-Hannes

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to