sorry - I have had a php5 CLI at hand for so long
I forgot that 'php -r' is not available in v4.
that said the 'php -a' option also works (although
I always find the interactive mode odd to work with)
Kevin Kinsey wrote:
Carl Furst wrote:
Well, I tried something simple...
$ php -r 'echo "hello world\n";'
Error in argument 1, char 2: option not found r
Error in argument 1, char 2: option not found r
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
php <file> [args...]
-a Run interactively
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
This means my install can't run inline stuff like this? Guess it
wasn't set
up to do that. So no I won't say that I will use php -r to test
anything..
lol :)
Actually run "php -v" and let's see if it's not version 4 ... in
which there is no "r" option available IIRC ....
please say your going start using "php -r" to test stuff like this. :-)
Not unless he upgrades, apparently.
Still, not too hard to open an editor, code a tiny script,
and run it from the CLI in either PHP4 or PHP5.
Let's all learn to test things, eh?
Kevin Kinsey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php