Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have heard you could use Xcode for PHP development with syntax highlighting, syntax check, code completion etc. some time ago, maybe years ago.

Is there a way to add PHP support to a current Xcode version (3.2.2 or later)?

Currently I use NetBeans for PHP development and I've tried some other IDEs. I just like Xcode and wondered if this is an option, too.

share|improve this question

migrated from stackoverflow.com Mar 19 '10 at 12:15

This question came from our site for professional and enthusiast programmers.

add comment

5 Answers 5

While I'm sure there's a way to do it, I would stick to a traditional text editor like TextMate or BBEdit for PHP.

They are lighter, and more full featured the Xcode in this particular area. Xcode is applications development specific, with all the bells and whistles you need from a true IDE. It's not cut out for PHP programming or web development in general.

share|improve this answer
1  
Xcode is also a really nice text editor though, for example it has the multi-file find/replace with a preview window similar to a good GUI version control app, that lets you quickly browse and control what changes will be made before it happens. And the "open quickly by filename" feature can also open a file by searching it's contents, handy when you don't know what parent class a method is defined in. I agree, Xcode isn't suitable for PHP but I wish it was. –  Abhi Beckert Jul 13 '12 at 1:00
add comment

While I have not used Xcode yet, Apple has a developer article about using Xcode for PHP development:

http://developer.apple.com/internet/scripting/phpappledevtools.html

I personally prefer using Coda for most day to day HTML/CSS coding or a full IDE such as NetBeans or Eclipse when needed.

share|improve this answer
2  
The original link is dead, here is the archived version: web.archive.org/web/20110811093439/http://developer.apple.com/… –  niutech Jan 10 '13 at 4:12
add comment

Although this question is now a bit old, I just needed to do a little PHP editing myself using Xcode 4. To turn syntax highlighting on for PHP (and lots of other) file types, all you have to do is open the file in Xcode 4, then select Editor->Syntax Coloring->PHP. Sweet!

share|improve this answer
add comment

Xcode development for PHP Apps got a whole lot better with its new source control system (4.3.x).

I simply cloned my github.com repo to my sandboxed web server, and created a new xcode workspace defining that as its base folder.

Of course you don't need github.com. But if you're working in this sort of environment its extremely handy to use xcodes' interface to manage commits/pushes etc, and visualize history; this feature alone makes it worth the extra CPU overhead needed (hardly noticeable on modern processors; but Core 2 Duo's can start to lag).

Sometimes the syntax completion gets in the way; so it may be advisable to turn it off; and if you're accustomed to using editors like BBEdit,TextMate, etc. you'll have to get used to your key commands not behaving like they normally would; I haven't explored the key bindings tabs but the solution may lie there.

share|improve this answer
add comment

As Josh K said—and also from my experience—TextMate is a better choice for web development; or, quite frankly Vim… if you like the comfort of the Terminal like I do.

However, if there is an affinity to Xcode, there are templates you can install into your Xcode bundle to make PHP development possible. This PHP Template fro Xcode is by Tony Johnston. The steps on his Github page should work for Xcode versions 2 to 4.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.