One of the features that I love the most about Python is it's powerful REPL. I love that I can pop over into the console and start testing/fleshing out an idea on the spot. I love being able to test new libraries this way as well which saves me tons of time.
The developers at Facebook have brought PHP developers a powerful REPL now ala-Python to round out a solid toolbox that PHP developers already have. The project is called phpsh and is written in Python.
To give it a go, just clone their git repo to your machine and install the tool via setuptools.
$ git clone git://github.com/facebook/phpsh.git $ cd phpsh $ sudo python setup.py install $ phpsh Starting php Install pcntl to enable forking on every command. type 'h' or 'help' to see instructions & features php>
Every PHP developer out there that's not aware of this tool is seriously wasting hours upon hours of their time with each project they complete without phpsh. Clone the git repo right now and start enjoying the benefits of an REPL like Python and Ruby developers have enjoyed for the longest time.
PHP already has a builtin interactive shell, what makes phpsh so special?
ReplyDeleteYou don't have to recompile php with readline to support comands history ;)
ReplyDeleteIf that's all, phpsh doesn't offer much.
ReplyDeleteCosat,
ReplyDeleteTry it out yourself!
1) Has autocomplete
2) Built-in docs
3) Pressing enter instead of typing ";" to end a line
4) ctrl+d doesn't type ";D5"
Its far better then php -a, seriously