Interactive PHP Shell for Drupal

There are many tools that us, the drupal developers, use everyday to have our work done. One of the tools that I use very often lately is an interactive php shell. 
 
It is called phpsh and here is the description from phpsh.org:
 
“phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation. It was developed at Facebook and ironically, is written mostly in python. It is open source and released under a modified BSD license.”
 
This tool is great for quickly inspecting the contents of an object or for executing a short snippet. In a live environment, where it may not always be possible to inspect code in a debugger, phpsh can be an invaluable tool for troubleshooting.
 
The phpsh console was adapted for drupal and drush here. It is installed like any other drush extension: copy the contents of the archive you download from the project page into your drush folder. The location of the folder on my computer is my home folder: ~/.drush
 
Here is a short video presentation of what you can do with drush phpsh:
 
 

View Comments

Add new comment

Your email will not be published.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <strike> <caption> <script> <param> <style>
  • Lines and paragraphs break automatically.
  • You may insert videos with [video:URL]

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.