Add information on PHP interactive shell.

This commit is contained in:
Jake Smith
2012-07-10 11:51:38 -05:00
parent 308686543c
commit feca5a2ab6

View File

@@ -14,7 +14,9 @@ Try running PHP from your command line:
> php -i > php -i
{% endhighlight %} {% endhighlight %}
The `-i` option will print your PHP configuration just like the [`phpinfo`][phpinfo] function. There are a number of other useful [command line options][cli-options], too. The `-i` option will print your PHP configuration just like the [`phpinfo`][phpinfo] function.
The `-a` option provides an interactive shell, similar to ruby's IRB or python's interactive shell. There are a number of other useful [command line options][cli-options], too.
Let's write a simple "Hello, $name" CLI program. To try it out, create a file named `hello.php`, as below. Let's write a simple "Hello, $name" CLI program. To try it out, create a file named `hello.php`, as below.