3 ms·
PHP repl is actually php -a
by powersurge360 15y ago
PHP repl is actually php -a
- mikey_p 15y agoNote that this is not a traditional repl in the style of of Python or IRB that evaluates each line individually. With php -a you have to enter an entire script, and then exit to run it, and which point you can no longer interact with the variables, etc. Also it's super backwards in that you need to add <?php tags to turn interpretation on. If you really want a repl that's useful for PHP check out http://www.phpsh.org/ http://www.phpsh.org/ by Facebook.
- powersurge360 15y agoNo, you can do evaluation line by line, but it isn't exactly nice. Just typing php forces you to type in the entire script.