• Advertisement
Sign in to follow this  

[web] What do you use to write PHP?

This topic is 3601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm poking around the net looking for some good PHP editors. Which ones do you use? What made you choose the one you're using instead of the others? What's the biggest daily pain in the a** caused by your PHP editor? Or the missing/misimplemented feature that bothers you the most?

Share this post


Link to post
Share on other sites
Advertisement
I use Notepad++, but it's just an advanced text editor with syntax highlighting for many different languages (including PHP). I don't do that much stuff in PHP anymore, but it works for me.

Quote:
What made you choose the one you're using instead of the others?

I used UltraEdit before, but this one is free and doesn't clutter the menus with millions of features I don't need.

Quote:
What made you choose the one you're using instead of the others? What's the biggest daily pain in the a** caused by your PHP editor? Or the missing/misimplemented feature that bothers you the most?

Nothing really. It does what it needs to do. But I'm a very simple man with very little needs.

Share this post


Link to post
Share on other sites
I use Midnight Commander for editing php (no, not live on the production machine :D)

Share this post


Link to post
Share on other sites
Depends on your coding style. I generally use Vim for everyday editing, but Textmate, e-Editor and Intype are pretty good, too. For debugging, testing and integration, I use Waterproof PHPEdit. And of course there's always PHPEclipse.

Share this post


Link to post
Share on other sites
I used to use Notepad++ but in recent projects I've wanted my IDE to help me out. I started using Eclipse with the PHP plugin and it's ok. There's a lot to be desired, like cross file search or code cross referencing.

Share this post


Link to post
Share on other sites
Quote:
Original post by Colin Jeanne
I used to use Notepad++ but in recent projects I've wanted my IDE to help me out. I started using Eclipse with the PHP plugin and it's ok. There's a lot to be desired, like cross file search or code cross referencing.

Jeez, no cross-file searching? That's ridiculous.

What do you mean by "code cross referencing"?

Share this post


Link to post
Share on other sites
emacs for the edition, with make, ncftp, phpDoc for the rest of the functionality.

Concerning 'cross-file searching', to search for "FooBar" in all your files, M-x grep RET FooBar *.php RET [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by BeanDog
What do you mean by "code cross referencing"?

Say I want to see where a particular method is defined or all the locations that it's used in. I would like some method of getting that information, preferably within the IDE. This requires an understanding of the syntax of the language and the PHP Eclipse plugin makes no attempt to do this. Considering that I cant even figure out how to search for something across all the files in my project I cant even do poorman's cross-referencing by searching for the function's name and then filtering out all the false positives.

Right now I use PHPXref to do cross-referencing but overall the utility sucks since it's external from the IDE and only supports the poorman's method of cross-referencing.

Share this post


Link to post
Share on other sites
I wonder how you can do better than simply grepping the name in the entire source directory... PHP doesn't have the static structure required to do serious static analysis.

Share this post


Link to post
Share on other sites
I use Kate, the KDE text editor. Back in the old days when I still used Windows I used HTML-Kit for all my PHP coding needs. I much prefer a good text editor to an IDE. IDEs always get in my way.

As for debugging, I recently discovered XDebug, but I haven't had the time to try it out yet. It looks good though:

http://tech.blog.box.net/2007/06/20/how-to-debug-php-with-vim-and-xdebug-on-linux/

Share this post


Link to post
Share on other sites
I use Programmer's Notepad (its text editor can mix-and-match PHP/HTML/javascript/CSS in a single file, which is useful).

For debugging, I insert a check at the start of the main source file to see if the software is running locally (ie, not on a production server), and if so insert a custom error handler that displays a neatly formatted backtrace when something goes wrong. Not very elegant, but it works well enough for me. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by ToohrVyk
I wonder how you can do better than simply grepping the name in the entire source directory... PHP doesn't have the static structure required to do serious static analysis.

This is true--it's a sad byproduct of such high-level languages that it's nigh-impossible to have an IDE do all the cool stuff I'd wish it did. For instance, "Show me where this function is defined" or "List all member functions of the variable $TheClassInstance, including inherited members" or "Refactor the selected code into its own new function of this class."

Sander, in what ways does an IDE get in the way of your PHP development?

Share this post


Link to post
Share on other sites
I use Ultraedit mainly because it has the best ftp browser out of all the ones I tried.
I needed this feature because I was tired of editing-saving-and reuploading everytime I wanted a code change.

Share this post


Link to post
Share on other sites
Quote:
Original post by ToohrVyk
I wonder how you can do better than simply grepping the name in the entire source directory... PHP doesn't have the static structure required to do serious static analysis.

An understanding of the code should be able to at least provide educated guesses. A pathological example might include something like


$className = 'FooClass';
$classInstance = new $className();


If $className comes from something unpredictable then it would be impossible to guess what $classInstance is but if I have something like


class MetaBase {
function doIt() {
// Doing it!
}
}

class FooClass extends MetaBase {
}

class BarClass extends MetaBase {
}

function MakeIt($className) {
$classInstance = new $className();
if (is_a($classInstance, 'MetaBase')) {
return $classInstance;
}
return false;
}



Then we know that wherever MakeIt() is known to have returned something non-false then whatever it returned is a type of MetaBase. This type of information requires a lot more complexity and a lot more understanding of the code but even in the cases that it works effectively it would be very useful.

And if anything but the most basic inference is too difficult then at least provide me with an editor that recognizes that if I have this code


class Foo {
function Save() {}
}

class Bar {
function Save() {}
}



and I looked up where Foo->Save() was used it wouldnt also give me uses of Bar->Save(). There are many cases when it is possible to be sure if it's one or the other. If it's not sure then give me the option to know about these so I can decide, but separate them off from the others.

Share this post


Link to post
Share on other sites
Quote:
Original post by BeanDog
This is true--it's a sad byproduct of such high-level languages that it's nigh-impossible to have an IDE do all the cool stuff I'd wish it did. For instance, "Show me where this function is defined" or "List all member functions of the variable $TheClassInstance, including inherited members" or "Refactor the selected code into its own new function of this class."

All of those can be done in dynamic languages with a good IDE. If you IDE can't do it, replace it.

(I use Komodo.)

Share this post


Link to post
Share on other sites
Quote:
Original post by BeanDog
Sander, in what ways does an IDE get in the way of your PHP development?


In various ways. It depends on the IDE in question and the language I'm developing in (I code PHP, Python, C and C++ mostly). The most annoying thing with most IDEs is that they tend to break my concentration. They all try to alert me or be helpful in some way that distracts me. Error checking while you type is annoying (the reductio ad absurdum is of course the office VB editor that pops up a modal dialog every time you leave a line with an error in it). Same thing for auto completion popups.

The second most annoying thing is that IDEs usually impose a certain structure on your application and if you want to do it differently then you get a lot of hassle. This is more apparent with C/C++ IDEs that with PHP/Python IDEs though.

I know that with many IDEs I can turn all those things off and reconfigure the hell out of it. But when I do that I just end up with a bloated glorified text editor anyway. Combine that with the fact that I'd like to use one application for all my coding (I don't want app A for PHP stuff, app B for C++ stuff, etcetera) and it's easy to see that a good text editor is a much better fit for me.

For the moment I've settled on Kate (from the KDE desktop environment). It has all the features I want. It's fast, light weight, does highlighting of a massive amount of languages, auto indenting and editing remote file over FTP, SSH and a whole lot of other protocols. That's all I need in an "IDE". The only thing I'm still looking for are a few nice color schemes :-)

Anyone have a nice color scheme for PHP and Python? Post screenies if you got 'em!

Share this post


Link to post
Share on other sites
I use Dreamweaver with instant access to my ftp-site so I won't have to upload all the edited files manually

And also dreamweaver portable for my u3 usb-stick XD

Share this post


Link to post
Share on other sites
ActiveState recently released a free version of Komodo IDE. It's more of a generic text editor with syntax highlighting, code completion and some integrated support.

Share this post


Link to post
Share on other sites
I ran across a couple of beautiful color schemes for vim. After a futile effort to configure Kate with those colours (I realized quickly that it would take forever to change all many, many syntax colors for Kate) I switched to (g)vim for most of my editing, using the netrw plugin with ssh-agent for remote editing. I'm just testing with it, but so far I like it a lot. It's a very steep learning curve but the possibilities are endless.

Share this post


Link to post
Share on other sites
I used the Zend Studio beta for a while. It was a bit more polished then Eclipse PDT. The code completion is quite helpful for working with bigger applications or existing frameworks. I used to use ultra-edit but the author never figured out when to stop adding features and it has become as bloated as the software it is trying to compete against. I'm still looking for a general purpose text editor since notepad++ annoys me.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sander
Anyone have a nice color scheme for PHP and Python? Post screenies if you got 'em!


Screenshot is a bit old, but i use the same color scheme for everything in KATE:

Share this post


Link to post
Share on other sites
Better than the default, but find it a bit hard to read. Here's the scheme I now use in vim. It's called wombat.

Share this post


Link to post
Share on other sites
I use the official Zend IDE at work. It's good, but it's written in Java, which means its slow, unresponsive and hogs a lot of memory...

At home I use DevPHP because it's the first one I came across. I wouldn't recommend it as it's nothing special (and it doesn't obey it's own tab/space conversion preference settings!).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement