Jun 20, 2011

Using NetBeans 7 as PHP IDE

imageFor few days I've been working on a PHP system for my new company to develop a web based application.  I've been spending about 3 – 4 days searching the best PHP IDE that could provide intellisense and code completion that could replace my favorite .NET IDE which is Microsoft Visual Studio(VS).

There are a lot of blogs and reviews on great IDE for PHP programming that could provide intellisense and code completion for PHP but none could replace VS on the first hand.  Kudos to Microsoft for the most impressive invention on IDE for C# programming language.

There are several IDE that I've download and gave a test drive on developing simple PHP application from simple function to complex OOP programming but then I've come to conclusion that NetBeans none the less best suited me at this moment. Most PHP programmer will definitely try to find other alternatives rather than waste memory and CPU resources on some Java based applications. If I had another choice, I'll surely migrate from NetBeans to other IDE that use less resources.

The features that I need most on NetBeans are listed below:
  • Generate PhpDoc out-of-box
  • Safe delete Refactoring
  • Type Hierarchy View(useful when you are dealing with OOP Programming)
  • Smart Intellisense
  • SFTP upload on changes
  • Subversion, Mercurial, and CVS versioning support.
  • Great and wide tutorial support access 24/7 (through main website)
One major advantage using java based application is that we could run the application in no matter what Operating System that we run as long as we have Java installed.  On my case, I need flexibility on this one because I'm using linux at home and Windows 7 at the office.  This features is most important to me so that I can continue using same IDE on both environment.

Well, There are nice tutorial on how to start using NetBeans to develop a good PHP system.  Please follow the the tutorials here.

Setting XDebug to Debug PHP Project on NetBeans

When installing NetBeans, the Debug function does not work by default. When I first click the debug button on NetBeans menu, the browser did popup but debugger cannot established session to XDebug through port 9000. In order to make this work out of box, we need to set and edit our Xdebug to work with NetBeans.

PHP by default will comment out line containing debug.dll in php.ini.  To edit this, locate your php.ini file – For Windows user who using XAMPP, this file is located at C:\xampp\php\php.ini . User your text editor to add this line in php.ini file :
   1: zend_extension=c:\xampp\php\ext\php_xdebug.dll
   2: xdebug.remote_enable=1
   3: xdebug.remote_handler=dbgp
   4: xdebug.remote_mode=req
   5: xdebug.remote_host=
   6: xdebug.remote_port=9000

We can then run debug function to debug our PHP application to find errors or track variable value through out the process. Enjoy using your NetBeans with similar capabilities as Microsoft Visual Studio on your favourites Operating System.

As a conclusion ..

It doesn't matter on what IDE you prefer to use to develop your project.  The most important things is how you deliver your program to your customer is what matters.  And what ever IDE that you used should reflect your own need and styles. Any comment(s) on other PHP IDE that could run on either Windows or Linux platform that I should try are mostly appreciated.  Don't forget to like this post on Facebook !

Blogger Labels: NetBeans,system,code,completion,Microsoft,Visual,Studio,Kudos,language,conclusion,moment,Most,memory,Java,advantage,office,features,environment,tutorial,XDebug,Debug,Project,menu,session,port,user,XAMPP,text,Enjoy,customer,Linux,platform,Facebook,tutorials,errors,intellisense

Thank you for your unbelievable support on Negative Zero - Permission to read and write blog for nearly 4 years. Don't forget to like Negative Zero on Facebook.
Blogirific.com Blog Directory

Post(s) you might like to read :



Post a Comment