Coderoncode

Random ramblings about code, programming and technology

Books


Social Media


Lead Developer @ Demac Media


© 2014. Allan MacGregor All rights reserved.

Working with Psysh

I previously mentioned Boris, a terrific REPL for PHP, and while Boris is a great and functional REPL, is not the only available.

Psysh is actually more than a simple REPL it's also an interactive debugger; which means you can say goodbye to the endless barrage of var_dump() and die() statements.

But do we really need another REPL for PHP, well honestly we could probably get by with the solutions currently available however Psysh has an extremely interesting Ace under the sleeve, it can also function as a realtime debugger.

Regardless of the mode on which is running Psysh can offer a lot of information about our current application state and code. For example the PHP documentation is available by using the doc command:

We can also get more information about our current application objects and their properties:

Psysh has also been integrated with several popular frameworks like:

If you are looking for a powerful REPL to integrate with your PHP project, Psysh might the right tool for the job; with powerful features and an integrated debugger Psysh has a lot of value to offer to any project.

Word count: 190

Enjoyed the article? Follow me on Twitter or with RSS.

comments powered by Disqus