Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ThinkPHP.de:
More PHP Power on the Command Line
May 30, 2005 @ 11:34:22

ThinkPHP.de has another new entry today, one that talks about how you can get a bit more power on the command line in PHP.

If you use PHP on the command line you most probably know the -r parameter to execute one line of code. This feature is quite nice but it's hard to keep the quoting right. Depending on which quotes (single or double) and shell you are using you might even need to keep attention on escaping variables. Writing the code directly to the STDIN of a php instance is quite annoying if you just want to change something after typing it. Always writing the code into a file (even so it's just a single line +

It's really a pretty cool little idea, providing an interactive way to execute PHP code, perform multi-line functions without having to create a file, and even comes with tab-completion (on functions, constants, class names, varibles, etc)! I believe it's out there in the current snapshot (they're not the clearest on that part), so if you'd like to give it a shot, hop on over and get the latest edition!

tagged:

Link:


Trending Topics: