1

By UDF code completion, I mean that if I have a function called:

function get_whoopee($a, $b, $c) { } in filex.php,

and I type "get_wh" from anotherfile.php, it will enumerate all functions matching that prefix (get_wh*) with prototype to jog my failing memory.

I can't explain to you how useful that is if you already don't know. Of course our prototypes should be straightforward, but this feature is productive.

I expect at least 1 comment telling me "real men use vi or emacs." I'll upvote you for your (predictable) sense of humor.

The worst part is that I simply can't find a good one since ZendStudio 5.5. The new one is based on Eclipse and absolutely terrible. Coda, so far as I can tell has code completion but only within a file. I don't understand the point of that. I really don't. The reason you need code completion is so you can reference stuff that isn't nearby, and preferably even if the file is not open.

Help. Has anyone found something to replace Zend Studio 5.5?

Jaimie Sirovich
  • 1,088
  • 2
  • 10
  • 14

2 Answers2

2

I, and many others I know, am a huge fan of PhpStorm and believe it's well worth the money.

  • Great code completion that also recognizes PhpDoc
  • Awesome debug support
  • Integrates well with VC
  • Easy to install plugins that add support for myriad things. e.g. LESS, SCSS, CoffeeScript, NodeJS, much more.
  • A ton of other useful features

Check out the trial, spend a little time configuring the settings. e.g. I've added many live templates, set up PHPCS, code style, etc.

Become familiar with the keyboard shortcuts for quickly navigating/finding files & symbols (objects, methods, functions) Cmd+Shift+N, Cmd+Shift+Alt+N. Pretty sure most of that is in the Quick Tips dialog.

jezrael
  • 822,522
  • 95
  • 1,334
  • 1,252
simshaun
  • 21,263
  • 1
  • 57
  • 73
  • I saw this one, but it also looks like it's based on Eclipse and rather heavy/slow when I sampled it a little while back. Is it very different than the reincarnation of ZendStudio? – Jaimie Sirovich Jul 13 '13 at 05:52
  • "Slow" is subjective. I know many people in IRC that use it and none have complained of it being slow. I myself have never noticed a slowness. – simshaun Jul 13 '13 at 05:57
  • I'll give it another shot. I did find Komodo/Activestate to feel more native and faster. I just found features lacking as well. At the end, I kept liking ZendStudio 5.5. – Jaimie Sirovich Jul 13 '13 at 05:59
  • Feature-wise, Zend is probably comparable. I haven't used it in a *long* time. On a side-note regarding speed, PhpStorm indexes the project on start-up. Some things are a little sluggish during that period, but it typically only lasts a matter of seconds, roughly 10 seconds on a massive Symfony2 project with thousands of files, on a SSD. Things are pretty zippity after that. – simshaun Jul 13 '13 at 06:05
  • I'm tinkering with it more now on your advice. Maybe I _wanted_ to hate it based on my perception that it was based on Eclipse. The saddest part of my quest is that I really _wanted_ to like Coda. Several times. And I failed. Even with the bias. – Jaimie Sirovich Jul 13 '13 at 06:08
0

Many developers I know are also very happy with PhpStorm, so I can't argue with simshaun's recommendation there.

Personally, I am satisfied with ZendStudio 10. To get full functionality out of it, you must make sure your project has "PHP Support" enabled (right-click project, and choose Configure > Add PHP Support...). Then it does what you describe, although in my case, I work on psr-0 projects with autoloading and namespaces. From your description, it sounds like you are looking for it to work on procedural scripts? I'm not sure about that. FWIW, it is also ZF2-aware, so it can find references for some things which PHPStorm doesn't resolve. I think this is mainly going to be where there is ZF2 Di in the mix, but beyond having a PhpStorm bud remark, "hey how'd you do that?!" one time, I don't have much more details on this difference.

ZendStudio 10 does also have editor templates (as I'm sure many do). Many templates come pre-configured, such as if you start typing 'sw' it offers the SPL 'switch' suggestion, and also a editor template, associated with 'swi' which is a full switch statement. If you select the editor template suggestion (with your down arrow), it shows you a prototype of the whole control structure. If you choose it, it inserts the full statement with the first case, break and default, which you can fill in and then modify.

I use some custom templates for things I do frequently, where want my cursor inserted into the middle of it. For example, I defined 'zddd' to expand to this:

\Zend\Debug\Debug::dump(CURSOR_INSERTED_HERE);die();

While ZendStudio 10 does auto-hint if I start typing out any fully qualified method name longhand, that often still makes lots of matches initially, unless you've already imported the class with a use statement (and can use just the short class name). Even then, it's not nearly as convenient as a pre-defined template associated with 3 or 4 characters.

Hope that helps.

dualmon
  • 1,225
  • 1
  • 8
  • 16
  • I want it to work with function calls in the global namespace, in namespaces, and in classes. I actually use PAAMAYIM_NEKUDOTAYIM "::" to simulate namespaces in many cases (\ didn't exist). I'll give ZS another try. My gripe is that last I tried it, it seemed like a step backwards from ZS5.5! – Jaimie Sirovich Jul 14 '13 at 05:35