I'm trying to run a PHP script on the command line.
listing for myscript.out
<?php
echo "Hello world";
?>
Let's try running it...
$ php myscript.php > myscript.out
$ cat myscript.out
Expected output in myscript.out:
Hello world
Actual output:
<?php
echo "Hello world";
?>
Whatever the script, php simply echos out the contents and does not attempt to run the script.
$ php -v
PHP 5.3.2 (cli) (built: Jun 25 2010 13:04:28)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
I'm on OSX Snow Leopard and have installed php via macports.