Page 1 of 2
What does JetBrains IDE PhpStorm 2.0 offer the professsional PHP Developer? We put it through its paces using the free 30-day trial.
I am a long term user of Eclipse PDT and most of the time it more or less does what I want, but this is more due to me learning its ways than any basic usability it might have. Even though Eclipse is an imperfect solution any IDE speeds up the development process such that it becomes worth using.
Is there a better way?
I decided to give JetBrain's PhpStorm 2.0 a try - for 30 days at least before the free-trial elapsed. This isn't a full and comprehensive review of PHP Storm but a look at how it helps with the day-to-day task of working with a PHP web site.
I will skip the usual download and install story because it did just that with no problems - just go to download and install it.
However don't expect to simply open the IDE and start writing PHP code. The reality of almost any sort of web development is that you have to set the system up to serve the content and at the moment only Microsoft with ASP.NET and Visual Studio provides a complete development environment out of the box. If you just want to create PHP scripts then you will need to install just the PHP interpreter but in most cases you will need to set up a web server as well, and so you might as well download and install a full LAMP or WAMP system. Basically you have to have a development system up and running so that you can browse PHP pages before you even think about using PhpStorm. Currently this is the way it is with all PHP IDEs and it will probably remain so.
Also in most cases will need an existing PHP system to be imported. If you have the luxury of developing a system from scratch then everything is much easier because you can let it grow from a single file and grow with your knowledge of the IDE. In most cases, however, importing a complete project probably based on one of the content management systems such as Joomla or Drupal is going to be the norm. In my case the import took about 20 minutes as a local copy was created. You can make the connection to the remote file system using file shares or FTP.
As with all such setups it is important not to work on the production site - you need to make a development copy. The good news is that that PhpStorm makes it particularly easy to keep both the remote development site and the remote production site updated in a controlled way via the deployment menu.
Once the local copy of the site is made you can start working with it. If you are creating a site from scratch then the first things you tend to notice are the quality of the editor and other features that help with code generation and management.
If you start will an existing site at first your attention is generally drawn to debugging facilities. PhpStorm uses the same approach to debugging as Eclipse. You have to setup not only the debugger of your choice you also have to setup a debugging profile which indicates the start page and how local files map to files on the server. This isn't difficult but it can be a waste of time when you discover that you have the exact mapping wrong.
PhpStorm has an alternative way of debugging that appears, at first sight, to be magic.
First you use a web page bookmarklets generator (see above) to generate some custom bookmarks for your browser - you can install them by dragging them to the bookmark area. You specify the port that the debugger is running on and the IP address of the server. Then you click the listen icon on the PhpStorm toolbar and start to browse the development website. When you want to debug a page simply click the bookmark that says Start Session and reload the page. As if by magic the Variables pane suddenly shows the contents of the variables used by that page and any breakpoints you have set are honored. Basically you can debug as if you had setup a profile. It works by setting a cookie on the server and there might well be clever ways of using this.