The Zend certification exam
Posted on October 31st, 2006 in PHP, Rants, Zend, zendconference2006 | 2 Comments »
A couple of months ago, Zend unveiled the new PHP 5 version of their certification exam, which they promised would focus less on syntactical issues and trick questions and more on testing if you actually understood how to program pattern-based, object-oriented code—or knew enough about it to fake it, anyway.
The importance of a well-known, respected PHP certification is pretty simple: there are lots of crappy PHP developers out there. From my experience, most of the people that do job interviews can’t tell good code from bad, so having some kind of recognizable certification is a way to say there’s a pretty good chance you won’t spew out a bunch of ugly, unmaintainable code that someone else will just have to rewrite a year after you leave.
Well, I just finished taking it, and I suppose it’s appropriate that it’s Halloween because there were plenty of tricks on the test. Roughly one-third of the questions seemed to be along the lines of, “Assume you are an idiot, and you enjoy wasting your time doing stupid things. Here is an example of one of the many stupid things you might try. What would happen?” For example, what would happen if you had a PHP 4-style constructor and a PHP-5-style constructor in the same class? What is the difference in the return values (not the output!) of print versus echo?
Questions like these are bad because they rely solely on educated guesses about PHP’s behavior—after all, most people will not have tried to do things like this. That would be fine if PHP were consistent, but one of PHP’s biggest flaws is its complete lack of consistency. You can never really predict how PHP will react to an exotic code sequence without just trying it and finding out, because there are very few rules that apply across the board. Sometimes PHP will try to discern what you meant and other times it will error out. Occasionally, and most egregiously, it will fail silently.
Not quite as bad but still annoying is the third of the exam consisting of questions about functions that most PHP programmers rarely or never use. When’s the last time you wrote a custom stream, for instance? And perhaps like any good programmer who commits inane things to memory and never uses an IDE or PHP.net you have memorized all of the parameters of all functions, ever. Can tell me exactly what a “1″ in this particular argument position does? And if you want this particular behavior, should it be a constant in this spot or a Boolean value?
Now, to be fair, the entire exam isn’t like that, and if you’ve been adding in your head I’m only up to two thirds. The final third of the questions is actually quite reasonable and covers object-oriented programming concepts in PHP, basic design patterns, implementation of interfaces versus abstract classes, multiple inheritance, E_STRICT compliance, and so on. These are good—they actually test if you understood how PHP 5 works on a broad level, and understanding broad concepts is far more important as a programmer than memorizing the effect of little-used parameters and the return values of things that you would never want the return value for—even if you’re testing knowledge of a specific language.
We took the test on paper (I had been told it would be on a computer and scored instantly), so I have to wait a week for my results. I have been programming in PHP for seven years now (starting with version 3 in 1999) and strictly in version 5 for the last year and a half. I also attended an excellent, mostly-English 8-hour prep session by Christian Wenz as part of the 2006 Zend PHP Conference. Tellingly, Christian again and again said things like, “You’ll never encounter this in the real world, but it might be on the exam.” Despite all that, I frankly have no idea if I’ll pass or not.
As I was leaving, I rode the elevator with a fellow test-taker. “I feel like I’m back in high school,” he said, “and I just failed the SAT.” Tell me about it.
Update: I passed.
Note: None of the specific questions I’ve written here are actual questions I encountered as part of the exam. However, they are similar in nature for the purposes of example.