One of the nice features of languages like Python, Ruby or LISP is the availability of an interactive shell. This goes in a Read-Eval-Print Loop and allows to quickly experiment with the language without having to write and execute scripts.
Unfortunately PHP has nothing like that out of the box, but one can find some external tools online. I found three and I’m not sure which are the relative advantages?
Did anyone try one of those shells and can give some advice about which one to use?
Yes, it does.
php -aorphp --interactiveare what you’re looking for. They’re useless before PHP 5.3 (segfaulty promptless<?php-prefix-requiring crap), but they fixed it up pretty well… just don’t do anything that will trigger a fatal error.Oh, and if you need to include a file that tries to do use getopt, you can make it work by opening the prompt thusly: