Skip to content

PHP Platform I Write Code In

As I’m sure you know PHP as with most languages you can code right in a text editor on your home computer. However this might not be the most effective use of your time. I get asked a lot, what I use to code in. Well after trying quite a few things the ZEND IDE is about the best thing I’ve found out there. Now I know there’s some of you that are going to whine that it’s a little overhead intensive and yes you’re right. Zend is by no means notepad. However it brings a lot of tools to the table that make it well worth that over head in my opinion.

  1. Built in sFTP, FTP drive mapping
  2. Stepped debugging
  3. Robust code completion library
  4. Version control and management

Now if you’re going to use Zend I invite you to go to tools/preferences first thing and uncheck “Use OS look and feel”. What this does is it makes Zend try and emulate what the rest of your computer looks like. For example if you’re running XP like me it gives it the XP look and feel. Honestly I hear a lot that Zend is super slow and people just can’t put up with it. Well this is what makes it slow, turn this off and the performance will improve 10 fold.

1. sFTP/FTP Drive Mapping
What got me started on writing this post is I was at nickycakes blog today and he was talking about drive mapping. I’m sure if you’re just starting or when you started with all this PHP and servers stuff one of the biggest pain in the butt’s was figuring out how this all worked. When I first started I used to run a copy of WAMP on my local machine and code everything locally. Then when I finished it and got it working I migrated it to the server. If you’ve ever done this you know the headache this can be. Windows has a totally different file structure. Permissions can be a pain in the ass and so on. Also once you have it on the server it’s going to require some debugging ( funny how software writing works that way ). So when I first started I’d download the file, edit it, upload it and test. As you can see doing this 100 times can be an arduous task.

Zend to the rescue. With zend you have a file manager in your left pane by default. In this pane all you have to do is left click then hit “add FTP server”. A window will pop up that will ask you the details of you FTP or sFTP connection. Then once you hit ok it’ll connect to the server and map a drive into Zend just like another hard drive on your local box. You can open, edit, close files all in real time which totally eliminates the upload/download task. This also allows you to build in real time on the server where the scripts are going to reside in the end. One thing to take note of. If you’re used to coding locally and uploading you always have a sort of backup of a working version online. Now that you’re controlling things in real-time you can easily write over something that works with something that doesn’t. Remember when you hit save the old file is gone.

2. Stepped Debugging
When I first shifted to PHP I came from a small background in Visual Basic and developing in Visual Studio. Well visual studio has very very robust debugging tools. For example if ( this is for php only coders ) you could hit run and it would go through your script step by step. Then as it’s going through you could mouse over each variable, object, array or whatever to see what was contained in it on that line. You can then make some tweaks and run that same line again and see if it fixed it. Something like this might be useful right? Well Zend has debugging built into it. And you can set it up so that it works direct on your server.

3. Robust Code Completion Library
This was HUGE when I was new and didn’t know many of the functions at all. Code completion allows you to start writing a function and it will bring up a list of functions to finish it. For example let say you’re looking for a string function to do something. Well you know that most of the string functions start with a “str” so you start typing that and it pops up the whole list of functions that start with “str” then you page down the list and find the one you’re looking for. When you type the complete function it shows you 1. a description of what the function does, 2. what the function takes as inputs and 3. what the functions generates as an output. This can be extremely helpful and save you a lot of time from going to php.net. Zend also has a powerful real-time syntactic code check. Just like when you’re working on a word document and it underlines grammar mistakes in real-time so does Zend with your syntax. It’s very useful to see if you missed a bracket here or there which you might spend a good amount of time debugging.

4. Version control management
If you’re working with a team on a single project and sharing files this can be really useful. Also is very helpful if you want to make backups along the way in an easy fashion. Zend supports both CVS and SVN. I’m not going to get into a lot chat about versioning. But just know it supports all the features of versioning natively.

5. I’m sure there’s other things I’m not thinking of right now.
If you’re reading this and use the Zend IDE feel free to add them in the comments.

That’s just a few reason to give Zend a shot. I can guarantee you with the tools it provides it will help you learn faster and speed your coding up. Don’t be lame and try it for a day or two. Really give it a shot as it’s a complex program that takes some getting used to. But will save you time and improve your coding once you d.

19 Comments

  1. nogenius nogenius

    Awesome… thanks for the recommendation, I recently have switched from Dreamweaver to Eclipse for PHP development and have already noticed a world of difference, can’t wait to try out Zend!

  2. Eclipse is great. However if you’re working with PHP I think Zend makes a far better tool. Keep in mind it’s the zend engine that runs PHP and they’re the primary developer for the language.

  3. GspotGuy GspotGuy

    What version are you using?

    Zend Studio for Eclipse
    Zend Studio v5.5

    And are these worth downloading?

    Zend Studio Debugger
    Zend Studio Browser Toolbars

  4. Rockin, Zend Studio 5.5.1!

  5. your RSS feed is fucked in bloglines. The textwrap is off. Check it out.

  6. Nice tip mate, will give this program a try as I think the completion library will really help me!

    Cheers!

  7. I was still using Dreamweaver.The interface is hell easy i dont know about Zend Studio though…
    Lets see if u are recommending that i will give a shot.

  8. hvs hvs

    I think you forgot about remote debugging. This is so much powerful than FTPing the file to your local machine. I have a ubuntu box that I use to run my PHP scripts. With Zend, you can actually run the code on your Linux box and run the step-by-step debugging on the Windows client machine. No need to FTP, just debug and edit the code on the fly.

  9. Si Si

    Good tips man. I had a quick look at Zend a while back and tbh didn’t give it much time and went back to php designer & dreamweaver. Gonna make time to try and get into it, sounds like the drive mapping will be really useful.

    Take it easy.

  10. you should give the Komodo IDE a try…it’s got the code completion and all that plus it runs on Firefox’s engine which allows people to build extensions for it.

    The paid version has a regex builder as well, which is ridiculously useful.

  11. ed ed

    I like aptana – use it more for my rails work than anything. But it’s got php support.

    Tend to just stick with dreamweaver for php work…. but I’m off to check out zend.

  12. I just found out about Rapid PHP and gave it a test run last night. I’m not an experienced developer so I couldn’t really tell you how it stacks up against Zend in terms of more advanced features but I really like it so far. I’ve gotten used to using Notepad2 for editing (and Filezilla for ftp) so speed will always be compromised with a switch but it may seem worth it with Rapid. Just wondering if anyone else has any thoughts on it.

  13. Jay Jay

    Zend studio also has built in zend framework support which r0x0rs!

  14. Smaxor, great post as always, I’m going to check out the version control management tip. I’ve been exploring the posts on your blog today and thoroughly enjoying all he great content you have on here. Good for AM geeks!

  15. Hydro Hydro

    I like vim on Linux and Windows, and TextMate on OS X. I also highly recommend checking out E-Text Editor for Windows. It’s supposed to be a clone of TextMate. Also see the TextMate screencasts if you haven’t.. it’s revolutionary.

  16. Editplus anyone? Has a great built in upload feature, CTRL+SHIFT+S, press enter and bam, uploaded.

    Ryan

  17. ooopinionsss ooopinionsss

    How you think when the economic crisis will end? I wish to make statistics of independent opinions!

  18. Joe Joe

    A year on – do you still prefer Zend? I am looking for a Windows php editor to replace hacking in shell & vi

Comments are closed.