topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:45 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: PHP IDE recommendations  (Read 26074 times)

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
PHP IDE recommendations
« on: February 11, 2008, 02:01 PM »
I have to read someone else's code in PHP.
They didn't use any rules for line lengnth(standards : 80 col)... and lines are really long. This is a large project so an IDE may help navigating the code.

The problem is that none of the IDEs I have tested (PHPed, Komodo, EasyEclipse) can do proper word wrapping keeping indentation. The last one is the one I like the most right now.

It's a pain to have to scroll horizontally to see a long SQL call.

The only editor that does this kind of wrapping is sublime editor.

Any pointers? What's your recommendation for an IDE overall?
Thanks!

yotta

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 50
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #1 on: February 11, 2008, 02:25 PM »
if your willing to pay however much it is for dreamweaver, then its worth buying it just for its code view, otherwise aptana (http://www.aptana.com) has both free and paying versions(used to be just free! grrr) and supports all those features + direct saving to ftp and many different code highlighting options

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: PHP IDE recommendations
« Reply #2 on: February 11, 2008, 02:30 PM »
Last time i went searching, these 2 seemed top of the line to me, though i was mainly looking for good debug features:

however i must say that i didn't fall in love with any of the php ides i tried.  both of the above programs were very powerful, perhaps a bit too much so.. i tend to like my IDEs to not be so busy and complicated.

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
Re: PHP IDE recommendations
« Reply #3 on: February 11, 2008, 03:25 PM »
Seconding PhpEdit that was mentioned by mouser and also adding Komodo Edit (free version).

I still use emEditor as my primary code editor (not really an IDE).

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #4 on: February 11, 2008, 03:33 PM »
Did you try a programming editor, like PSPad or Notepad++? If you only want to read and fix code, an IDE is overkill IMO

Anyway, some of the PHP editors not mentioned here, and freeware as well are Dev-PHP, SIDE, tsWebEditor, Tulip and PHP Designer.

We briefly compared all them (minus PHP Designer, as it's not OSS), for a web project we have to take care off at college this year, and the most compelling seems to be tsWebEditor. We ended up doing the code by hand, anyway :P

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #5 on: February 11, 2008, 05:34 PM »
My suggestion is to first run the code through a code beautifier or pretty printer to get it formatted to your liking. Then using any of the IDEs mentioned, you should be able to fold code, jump to definitions, get an outline/treeview, etc.

Also, if you don't already have one, get a dual-monitor setup. The #1 tool for reading somebody else's code is screen real estate. Spread it out before you.

jazper

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 92
    • View Profile
    • Jazper's Software
    • Donate to Member
Re: PHP IDE recommendations
« Reply #6 on: February 11, 2008, 06:56 PM »
This is a commercial IDE for PHP:

Delphi for PHP
http://www.codegear..../products/delphi/php








urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #7 on: February 11, 2008, 10:59 PM »
Thanks tinjaw. Good idea.
I ended up using easyEclipse.
One free editor (looks really good with plugins) that does sane wrapping is Jedit. Unfortunately it cannot jump to a function definition (other than that, it's great).

First time looking at PHP. It does look like spagetti code.

@jasper: I've found mixed reviews on Delphi for Php. It sounds great on paper, but it looks like the code it genrates is so-so (and often broken). The reviews are early 2007 so this might have changed.

Dr-Leech

  • Member
  • Joined in 2006
  • **
  • Posts: 151
  • Psychedelic Coder
    • View Profile
    • site
    • Donate to Member
Re: PHP IDE recommendations
« Reply #8 on: February 12, 2008, 04:13 AM »
Not an IDE but I'm using EditPlus from long time ago and it's great. Kinda outdated lately but it's enough for my coding needs.

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #9 on: February 12, 2008, 10:22 AM »
Looks like hard wrap keeping indentation is not something IDEs nor editors do very well. Even Jedit, which does soft wrap fine, fails at hard wrap!

I'm stuck here because the PHPcodeBeautifier I found (by the PHPedit people) doesn't offer any wrapping options.

I remember an arcane unix command to format text witdth (used en-masse for email). Maybe I could use that?

I'm wasting a lot of time on this. It's surprising. I thought I'd find a good solution soon because it's a common problem... but nope!

Anyone knows a general tool that does hard wrapping?
Thanks

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #10 on: February 12, 2008, 11:45 AM »
Anyone knows a general tool that does hard wrapping?

I'm not sure what you mean by that term? Is that like turning on "Word Wrap" in Notepad? If so, notepad++ will give you that and PHP syntax highlighting. You can use the Function List Plugin (a bundled plugin) to navigate around functions. You also get code folding.

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #11 on: February 12, 2008, 11:53 AM »
soft wrapping: it's just a trick in the editor; it doesn't insert anything on the file; line numbers are kept.

hard wrapping: it inserts actual \n to split the lines. That's what I need.

notepad does wrapping but doesn't keep the indentation (as bad as eclipse). Only Jedit and sublime editor (that I know of) do this... but only in soft wrapping.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #12 on: February 13, 2008, 04:31 AM »
urlwolf: vim! :)

If you set some textwidth, it'll wrap on words when they pass that mark.

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #13 on: February 13, 2008, 08:13 AM »
yes, but that's when you type, not when you open someone else's code!

you could reformat the entire file that way by doing :ggvGgqi, but it does crazy things sometimes. Too dangerous.

I found that IDEs are just better to read other people's code (surprised to say that myself!). Go to function definition, find usages etc... it's better.

I found IDE nirvana in NetBeans... it's absolutely genial.

That, and the fact that I have decided not to look at php code, and use ruby instead :)

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #14 on: February 13, 2008, 09:38 AM »
* tinjaw slaps urlwolf with a python

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Re: PHP IDE recommendations
« Reply #15 on: February 13, 2008, 09:55 AM »
NetBeans looks nice... but no PHP :(

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #16 on: February 13, 2008, 11:51 AM »
yes, there's a php plugin. go to tools > plugins, and scroll down the list; there's php there. Never tried it though.

No netbeans python support that I could find. there's a debugger but the instructions to install it are outdated.

Tinjaw, have you tried both python and ruby?
Why do you like python better?

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,837
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #17 on: February 13, 2008, 12:45 PM »
But Wait! Before you answer... look at this:
http://poignantguide.net/ruby/

written by the incredibly prolific hacker "why the lucky stiff".

I have laughed as hard as when I found "RMS is the new Chuck norris". I thought that was impossible :)

_why's existence makes me renew my faith in humanity. And make me want to learn the language too :)

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #18 on: February 13, 2008, 12:47 PM »
Tinjaw, have you tried both python and ruby?

No, I haven't tried Ruby. I have played with it a bit in an interactive online tutorial, but nothing beyond that.

Why do you like python better?

I can't say one is better than the other, since I haven't used Ruby. It's more of the case that I love Python and have no interest in Ruby.

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #19 on: February 13, 2008, 12:49 PM »
But Wait! Before you answer... look at this:
http://poignantguide.net/ruby/

I am familiar with that book and have heard nothing short of raving reviews from anybody who has read it. In fact, when I was looking to get started with Python there was a lot of chatter on the Net about writing just such a book for Python.

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Re: PHP IDE recommendations
« Reply #20 on: February 13, 2008, 12:53 PM »
Agreed! Why's Ruby guide is a classic - it is worth learning the language JUST as an excuse to read that document!

If only such things existed for Javascript, PHP, Java etc etc.

I have toyed with Ruby and it seems very elegant and a great tool for certain applications. I have a friend who is using it to code his experimental maths.

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #21 on: February 14, 2008, 10:25 AM »
But Wait! Before you answer... look at this:
http://poignantguide.net/ruby/

written by the incredibly prolific hacker "why the lucky stiff".

Heh, the guy from Hackety Hack ;D

ivanv

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 27
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #22 on: February 22, 2008, 04:11 PM »
I'm wondering why nobody has mentioned Zend Studio. It's been years last time I touched PHP code, but I used this IDE and it was almost like being in Visual Studio (minus the Visual part of course). I'm sure it has come a long way since then.

allen

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,206
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #23 on: February 22, 2008, 04:25 PM »
Agreed! Why's Ruby guide is a classic - it is worth learning the language JUST as an excuse to read that document!

If only such things existed for Javascript, PHP, Java etc etc.

Note quite as fun as the book for Ruby, but what I've seen of it thus far I'm quite pleased with http://eloquentjavascript.net/

Jussi Jumppanen

  • Member
  • Joined in 2005
  • **
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: PHP IDE recommendations
« Reply #24 on: February 24, 2008, 05:03 PM »
hard wrapping: it inserts actual \n to split the lines. That's what I need.

Just a thought. Since PHP is a bit like C in terms of syntax, maybe one of the c/c++ beautifiers will also work with PHP?

BCPP C/C++ Code Beautifier V1.9 - http://www.zeusedit....viewtopic.php?t=1067

Code Beautifier for C/C++, C#, D and Java - http://www.zeusedit....viewtopic.php?t=1044

Artistic Style Code Refomatting - http://www.zeusedit..../viewtopic.php?t=221

JussiJ