interactive console for Ruby, PHP
For ruby, you want the 'irb
' command.
For python, you can enter interactive mode with the 'python
' command.
For php, you enter a basic interactive mode with 'php -a
'. Because of its limitations, other interactive shells have sprung up. PHP-Shell is one of them.
Also, if you are working with a Ruby On Rails project you could use
ruby script/console
from your Rails application root. This is a good approach since you get an interactive ruby shell and the advantage is that loads the entire application stack for you. Pretty handy if you are testing your new code or trying to debug something.
php doesn't lend itself very well to an interactive shell, because you can't redefine functions and classes. So while there is an interactive shell available, it's not very useful.
Make sure you have php5-cli installed and type 'php -a' at the command line.
you are looking for phpsh same as irb for ruby. php-cli allow you to run scripts for the command line like
myserver> php -r "echo 'hola mundo';"
so what you are asking and all replies about php-cli are different. also php-cli has it own php.ini that allow you to have differents configurations depends of run php over httpd (like apache) or in bash
saludos