Page 2 of 2
At some point you are going to have to write some PHP and this is where the fun begins - after all code creation is so much more satisfying than debugging! The first thing that you notice using PhpStorm is the auto code completion but it doesn't end there. The code editor is extremely rich in features and you are unlikely to find the best way of using them all in the first few minutes of use so take it slowly and build up.
I'm just going to mention the few that I found immediately of use. Given how much trouble I have with spelling the built-in spellchecker saves me from many embarrassing moments - it may not be directly about code but it's something many coders really welcome.
The code prompting includes properties and methods of any classes you have defined and you can immediately find usages of any name, declaration, implementation and so on. You can also automatically generate overrides, getters, setters and so on.
One feature I really liked was the ability to find out what a function was overriding by hovering over the small icon that appears next to its name.
And if you click on the icon you can drill down through the inheritance chain.
A structure panel shows you the methods and properties of the class you are creating including inherited methods and properties. As you might expect the editor has a lot of help with refactoring. You can safely rename, move and delete existing elements and create new variables, methods and fields.
One aspect of PhpStorm I haven't got into as yet is the Smarty Template engine. This has to be downloaded and setup as a separate step but PhpStorm 2.0 supports its use, including syntax highlighting, custom delimiters and so on. I have been meaning to try a template approach to creating pages and this seems like a good chance to get to grips with it - look out for another article.
PhpStorm 2.0 also has support for automatic unit tests with the help of PHPUnit. Again, as I am working with an existing project that doesn't have any unit tests already it isn't a facility I have been able to try out but it is nice to know it is there!
Another big area I have so far avoided is source control in PHP and it is something I miss. I use it with C++ and Java but not PHP for no obvious reason other than not getting round to setting it up. The good news is that PhpStorm supports all of the main source control packages including Git, Subversion and so on. You can customize the support to the one you choose. It also has a local history option that you can use to see what has happened to a file since you last uploaded it to the server.
(click to enlarge)
To try PhpStorm 2.0 for yourself go to its area of the JetBrains site:
and click the "Download now" button to start a Free 30 day trial - there's no forms to fill, it's a simple matter of running the .exe file and following the steps in the Installation Wizard.
If you would like to be informed about new articles on I Programmer you can either follow us on Twitter or Facebook or you can subscribe to our weekly newsletter.