Hi,
When php is invoked from the command line with -h we get exit code 0 as
expected:
-bash-3.2# php -h ; echo $?
Usage: php [options] [-f] <file> [--] [args...]
php [options] -r <code> [--] [args...]
php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--]
[args...]
...
--re <name> Show information about extension <name>.
--ri <name> Show configuration for extension <name>.
0
However if we use (what I understand to be an) invalid option we also
get 0:
php -Z ; echo $?
Usage: php [options] [-f] <file> [--] [args...]
....
0
I've checked a couple of other tools (ls and grep) and they return exit
code 2 when the options aren't recognised.
Found on 5.2.14 and 5.3.3.
Thanks,
John.
--
John Carter
Development Manager
[email protected]