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.