About a year ago, Zend released the specifications of its PHP IDE, Zend Studio, publicly. I think they did this to help increase the quality of the open source PHP IDE’s out there. While this does mean more competition against their IDE, it also means more companies will be willing to move to PHP. And more companies moving to PHP means they make more with their real money maker, Zend Accelerator.
So after being away from PHP for almost a year, I expected to finally find a free PHP IDE out there that was actually worth using. But what to I find…crap. Useless crap. While there have been some improvements in other IDEs in the last year, none were really made where it matters most, CODE COMPLETION. To me, this is the most important tool a developer can have. Nothing improves productivity more…especially when you’re dealing with a language like PHP, which has no naming convention standards. Even of the IDEs that did offer code completion, none do it as well as Zend Studio, which knows how to parse user code and documentation to add to the code completion.
So finally, after breaking down and installing Zend Studio I start to work on a project. For those of you who haven’t worked on this project yet, its using WordPress, an open source PHP project. I tried to find already made plug-ins to add to fill in as many of the project requirements as I could, but when it came down to it, I couldn’t avoid going into the code. When I did, I found what I always find in open source PHP projects, really old code. By really old code, I mean the code still follows PHP 3 standards, which were poor at best. These are some of the things that annoy me the most:
-Almost every function you find starts with the line:
global $foo, $bar, $user, $data;
Why have parameters to a function if you’re just going to make all the variables global anyway?
-No functions or modifiers in classes. Which makes sense, the idiot that made this class doesn’t seem to know the difference between static and non-static functions anyway.
Error: Cannot use the identifier $this in a static function
Oh…I have to make an instance of that object before I can use the function….then why the hell does the function make me pass in all the properties the object already has?
-And my favorite, the ever fun GetData() functions. What is data? Oh..its an array. Whats in the array? Who the hell knows, you have to run it once with and plug in a var_dump to find out. This is why they added classes to PHP, stop making everything an array.