Netbeans for PHP FTW
I ran across a post a while back talking about how Netbeans now has PHP support. My first thought since I had never used it, and the name makes no bones about it’s target language, was that this must just be some gimmick aimed at Java devs to make it comfortable for them to slide over to other languages. The world already had one bloated, slow, Javaesque IDE that could do PHP…. Eclipse…. So why make another?
Curiosity got the better of me after hearing about some of the great stuff they were baking into the latest version. So I downloaded the 6.7 M2 PHP version and have been using it exclusively for the last week. Boy were my initial reactions dead wrong. This thing absolutely rocks for PHP development. It actually feels like and IDE built for PHP and not at all like PHP stuffed into a Java IDE (like Eclipse does). Its fast and packed with features. Some of the best features are not even the PHP ones. The HTML, CSS, JS, and SVN support all seem top notch as well (something sometimes lacking in PHP focused IDEs). The only sucky thing about it so far has been it’s name. If any one is listening, please change the name to something that will not scare off non java-heads from trying this awesome IDE.
There is even a blog for the Netbeans for PHP.
I’ve used quite a large number of IDEs and editors over the years for my PHP hacking. I’m not talking fired it up and made a bogus sample page, I’m talking using for months at a time to write real world projects. Here is a quick rundown of some of my past PHP hacking tools of choice to give a perspective of where I’m coming from on this topic (these are in chronological):
- Textpad
- I was n00b at one point :)
- Vim
- Just too lacking in features for my taste, but still use for server side hacking and locally for quickly popping open a file. Though I usually use MacVim these days.
- Dreamweaver
- When I was still a bit wet behind the ears and not as hard core on the server side this helped to make me more productive with client side coding and was sufficient for my server side needs (especially since I was also doing ColdFusion work at that time).
- PHPEdit
- Back when this was free and I needed something more robust than Dreamweaver for PHP coding this fit the bill quite nice.
- Eclipse
- Yes, I have actually used this quite a bit. At one point I was juggling lots of projects in lots of different languages at the same (PHP, ColdFusion, Python, bash, MySQL, XML, …) and wanted a way to streamline my workflow. Eclipse got the job done. It felt totally half baked and was full of bizarre Java language and concepts, but I was able find pluggins for everything I wanted it to do and it worked pretty well.
- Zend Studio <= 5 (before it sucked ass)
- Once I was able to focus on strictly a LAMP environment I started looking for something more suitable. I ran across Zend Studio and the wonders of server side debugging in PHP and I was hooked. I used this IDE for almost 3 years and loved it (it’s non PHP support was a bit weak but…)
- Zend Studio 6 (when it sucked ass)
- With version 6 of Zend Studio that decided to turn it into Zend Studio for Eclipse. I’ve never seen such a colossal step backwards for a piece of software (with the possible exception of Windows Vista). It didn’t support half the features it had in previous versions. The old studios was fairly lean, but the new one came with all the Eclipse bloat and could barely get off the ground with the main project I was working on at the time. Even though I could sluggishly code… I could not use the debugger without the thing crashing. The love affair with Zend Studio was over and was time to move on.
- Komodo
- I really like Komodo. It was my ZendStudio rebound, and is more or less still my IDE of choice until I burn NetBeans in a little more. I appreciate its support for multiple languages (use it for Python/Django on the Smoron project) and the javascript debugger. Not exactly sure how I put this… its good and functional but doesn’t exactly have a huge WOW factor.
- NetBeans
- Not sure if it is because its the “new” thing for me, or if it is because it is really that good. But I’m currently WOWed :)







very dark design! The Font meets with background and practically nothing not to read!
:(
I was using netbeans php a while ago but switched to eclipse. Netbeans didn’t support ‘go to function’ and only did code completion for keywords, what features could be more fundamental? Netbeans did handle HTML/XML better than eclipse so it’s still quite close.
Pavel, I’d heard others mention the text being hard to see as well. It shows up much darker for folks on windows boxes, and apparently I had not improved the contrast enough.
I kicked up the text brightness a few notches, so hopefully it will be easier to read. Thanks for letting me know.
Andy:
If I’m thinking the same thing you’re talking about, Netbeans has go to functionality. On my mac I hold command and click a class or function name to be taken to its declaration, or if the cursor is in the middle of the item you want to go to you can hit command+b (think its control on windows). I’ve actually found it to be much better at finding declarations and figuring out what type of object variables are then any other ide I’ve tried. I use a lot of type hinting and doc blocks, maybe it is keying off of those to help figure it out. You do need to make sure you’ve included the path to the libs you want autocompletion for if they are not part of the current project.
I’ve also found it rocks at code completion for object methods and properties. It doesn’t always pop up the box when I would like it to though, so i do find myself hitting cntr+space qutie a bit to force the autocomplete box open. Another killer feature is the way it displays the documentation for the current autocomplete choice. I especially like the ability to link to the php docs for the native functions.
[...] of Product Development, Harry Kautzman, recently reviewed the Netbeans IDE for PHP development on his blog. His post was discovered and featured prominently today on Netbeans community [...]
You should try the NetBeans 6.7 Beta which was just released. It is much newer than M2 and has tons of bug fixes. It probably has more features too.
The PHP guys at my office use TextPad and don’t think they need a full IDE. The HTML, CSS, JS, and debugger don’t seem to wow them for some reason? They said once NetBeans supports their frameworks of choice (CakePHP and CodeIgniter) then they will re-consider. Some people have found ways to make code completion work for these frameworks:
http://www.mybelovedphp.com/2009/01/27/netbeans-revisited-code-completion-for-code-igniter-ii/
http://bakery.cakephp.org/articles/view/model-based-code-insight-and-completion-in-netbeans
I read that NB 6.7 will natively support Symphony so I’m glad to see it progress. The only thing I’m worried about is Oracle’s purchase of Sun Microsystems. Nobody knows if Oracle will continue to maintain NetBeans IDE or abandon it.
Thanks for the links. I used to use CakePhp quite a bit in my ZendStudio days and was always frustrated by the lack of code completion in IDEs for frameworks that used a lot of naming convention magic.
On the debugging front, I did find it a little goofy at first having come from Zend Studio and Komodo. I utilize the firefox xdebug helper plugin to initiate debug sessions when I’m on a page I want to debug. On Zend Studio and Komodo as long as the app is running it is listening for incoming debug requests, but on NetBeans you have to first put the app into debug mode before it will listen for incoming requests.
Netbeans is NOT that good. After an initial 3 month test on Windows and Linux, I think I’ll pass back to Zend Studio or to Eclipse. Too many infantile stuff still going on in Netbeans.
hi!
I was a Eclipse user but now I switched to Netbeans since the 6.0 version.
I think that Netbeans wil be the most popular IDE for Java and PHP :-) , why not !
LIke “Pavel” sayed; very very very dark design! !!!!!!!!!!!! :)
You should try http://www.eclipse.org/downloads/packages/eclipse-ide-php-developers/galileom7 also.
It’s very nice.
Dear Reader,
I have to do CTRL+A many time to know that what am i writing… the theme is …..__ ____ if got no words… at least you must change the theme so that some 1 can read. THE PERSON IS OUT OF HIS/HER MIND WHO EVER MADE THIS THEME
Hi, I’ve read your post and I completely agree with you. I’ve been using Eclipse, PHPEdit, and other editors for few years now, and admit that NetBeans supports PHP very well,no… it just kicks ass as you said. Frankly speaking it’s great for long time projects where you need to focus on doing things.
I was astonished by it’s speed comparing to Eclipse and it’s now my IDE of choice. The features I liked the most is method indexing… ohhh i love it :D
By the way IMHO the leave-a-replay box’s background should be lighter, or font color might be changed to make a bigger contrast cause while writing my replay I never knew where is the text cursor…
Have fun blogging.
Best Regards,
Vito
hrrkii:
you said: “I especially like the ability to link to the php docs for the native functions.”
How do you enable that feature?
This is very helpful and informative
i have been try zend studio , eclipse, aptana , but now i’m using gvim ,love it never look back again :D.
tips from Andrei Zmievski (http://gravitonic.com/2007/02/vim-for-php-programmers-slides-and-resources) really helpfull.
Well, all I can say it would have to be a LOT better than Netbeans 6.5 to be any good cos Netbeans 6.5 sucked badly for PHP. The auto-completion was just woeful.
Oh and this design is WAY too dark. Black text on a dark grey textarea? Seriously?
I’m glad I came across this. I think I’ve followed exactly the same progression of IDE’s as you have (except Zend Studio 6) and have been looking for a reason to use netbeans. Thanks!
I’m going to give it a shot right now and try it for a week. Thanks for the post!
Agreed with other posters that this skin sucks.
I agree with you. I’ve gone through a bunch of text editors and IDEs over the years, and once I started Netbeans 6.5, I have a hard time going back to anything else. It is a bit buggy, but for the most part, auto completion has worked great, search is awesome, and it’s built-in subversion abilities are great. It took some time to figure out how to use all of its features (because there are so many), but now that I’ve been using it for a while its really help speed up some of my development time.
To Andy Till (and maybe some others), a few useful shortcuts:
CTRL + o – got to type
ALT + SHIFT + o – go to file
CONTROL + ALT + SHIFT + o – go to symbol (this will find functions, variables, constants etc.)
HTH
Add another to the ranks of formerly frustrated Zend users, now NetBeans convert. I gave up with Zend when they kept asking for more and more money for the tiniest software updates. NetBeans functionality is great — it’s a little sluggish sometimes when you have it running all day, but overall we are very pleased with it.
The person “out of their minds” that made this theme was me :) Thanks for the feedback, I appreciate it.
I’ve upped the contrast of all text and changed the comment form to a light text rather than black which should prove more functional.
Its been asked how you link to the online documentation for native php functions.
When the auto complete box is up (ctrl+space if not already up), there is an extra info window for the currently selected function/method. If it is a native function there will be a link to the docs on php.net in there along with the documentation for the function.
I’m using NetBeans 6.5 for PHP development for quite some time now and I’m loving it. I also tried a bunch of other IDEs, but NetBeans, even though having a few bugs, convinced me. The auto completion works like a charm.
The most nerve wrecking bug for me is:
1. HTML/JS syntax check that often shows errors that don’t exist (how can I turn syntax check off o.O)
Sorry, but as others have said, your page’s theme is way too dark. This is in Konqueror on a Samsung T260 26″ LCD, not exactly a low-end screen – so it’s not a “Windows Problem” this has got to be the third-worst theme I’ve ever seen in terms of readability. And no, the text in this edit box that I’m typing in is still too dark – if there are typos, it’s because it’s impossible to read.
(The worst was dark purple text on a black background. Black backgrounds don’t work for text. Ever. See Jacob Nielson’s useability studies)
Well, I just started using netbeans mainly for it’s debugging working right out of the box for the most part.
I also like how it has the deploy feature where it can copy your code from your source area to your server area automatically for you so you don’t have to litter your deployment area.
t.
[...] My love affair with NetBeans continues. The latest discovery in the long list of things to rave about is it’s newly built in (was part of the 6.7 Beta release) support for unit testing with PHPUnit. There is a nice tutorial over on the NetBeans site that gets you up and running with it in no time. [...]
Thanks for the great article and comment replies! I just found out my favorite FOSS editor for OSX, Smultron, is being discontinued by is developer and need a replacement. Netbeans seems to be the best thing around.
For anyone on mac confused about shortcuts for things its worth noting that the commands are very different on mac than on other systems. Often when alt or ctrl is used normally the mac default is to use cmd/applekey/META instead (in the keys prefs its called ‘meta’. If you read abotu something online that you want go in the keys prefs and search for the name of the function (i.e. go to symbol) and see what’s there. I’m spending some time tuning my keys and its doing wonders for my knowledge of netbeans features!
If you want some more awesome hints about keyboard shortcuts that expose useful features of netbeans check out this article, it’s been helpful to me: http://www.phpmag.ru/2009/01/23/extremely-usefull-netbeans-shortcuts/
very nice (:
thank you very much (:
thank you for the great help
the wedding rings are great
thank you
very nice site
good job thanks
really good job thanks my friend
good works my friend thanks
really nice work good site
very nice :)
Blog is very nice
The blog is very good
The blog is very good thank you
Well, I just started using netbeans mainly for it’s debugging working right out of the box for the most part
I resurected the xdebug firefox addon which is no longer available. It’s available at https://addons.mozilla.org/en-US/firefox/addon/58688 .
thanks nice blog good post
thx for the blog… i use also netbeans
thx
… i use also netbeans
good work, nice article but very dark design
thx but very dark
Yess very dark
Yess very dark
thx but very dark
thanks but ugly design
thx but very dark
Thank you good post, well done!
thx but very dark
Thanks good post and nie blog you have
very nice, thx
Great article my friend, well done.
Thank you guy well done nice blog.
yes, indeed NetBeans has a lot of features.
great features. many usefull things.
great article my friend
nice site and i like your design
thanks for sharing.good site.
good article and nice site too
very good
very useful story i will add this into my blog, well done my friend.
Great. Thanks a lot!
great site with good article
iPhone App Developer, PHP Developer, Web Developer / programmer at affordable cost.
http://www.indianic.com/
thanks admin