About the Author

Chris Shiflett

Hi, I’m Chris: entrepreneur, community leader, husband, and father. I live and work in Boulder, CO.

Zend Certification Self Test

In Preparing for the Zend Certification, I provided the answers (with explanations) to the Zend PHP Certification Self Test. Zend has since updated the self test, so I'm again providing the answers to it. Of course, I recommend that you take it before you read this - this is for those who don't understand a particular answer or can't figure out which one(s) they missed.

Question 1

What does <? echo count ("123") ?> print out? 

A. 3
B. False
C. Null
D. 1
E. 0

The answer is D (1), because only a single argument is given to count(). Incarnations of this question typically confuse people due to the fact that count() is almost always used to count elements in an array, so they're not familiar with using it in any other context. Aside from that, it's pretty straightforward.

Question 2

Which of the following snippets prints a representation of 
42 with two decimal places?

A. printf("%.2d\n", 42);
B. printf("%1.2f\n", 42);
C. printf("%1.2u\n", 42);

The answer is B. This question only requires that you remember the basic format strings for functions like printf() and sprintf().

Question 3


$text = 'Content-Type: text/xml';

Which of the following prints 'text/xml'?

A. print substr($text, strchr($text, ':'));
B. print substr($text, strchr($text, ':') + 1);
C. print substr($text, strpos($text, ':') + 1);
D. print substr($text, strpos($text, ':') + 2);
E. print substr($text, 0, strchr($text, ':'));

The answer is D. The string position of : (the colon) is two less than the string position of the t, so strpos($text, ':') + 2 provides the string position of the t. The substr() syntax therefore says that we want the substring of $text that begins with the t and continues to the end of the string.

Question 4

What is the value of $a?


= 123 == 0123;


A. True
B. False

The answer is B (False). This question is challenging, because you must know that PHP treats 0123 as the octal representation of 83 due to the leading zero (64 + 16 + 3 = 83).

Question 5

What is the value of $result in the following PHP code? 


function timesTwo($int)
$int = $int * 2;    

$int = 2;

$result = timesTwo($int);


The answer is null, because timesTwo() doesn't return anything.

Question 6

The code below __________ because __________. 


class Foo



function bar()



A. will work, class definitions can be split up into
   multiple PHP blocks.
B. will not work, class definitions must be in a single PHP
C. will not work, class definitions must be in a single file
   but can be in multiple PHP blocks.
D. will work, class definitions can be split up into
   multiple files and multiple PHP blocks.

The answer is B, because class definitions must be in a single PHP block.

Question 7

When turned on, __________ will __________ your script with
different variables from HTML forms and cookies.

A. show_errors, enable
B. show_errors, show
C. register_globals, enhance
D. register_globals, inject

The answer is D. While the first two answers make no sense, both C and D seem viable, and the difference between the two seems entirely subjective. If you consider register_globals to have a negative connotation, you're more likely to think of its behavior as injecting rather than enhancing. However, I'm not sure that a distaste of register_globals is a necessary characteristic of an expert PHP developer.

Question 8

What will be the output of the following PHP code: 


echo count(strlen("http://php.net"));


The answer is 1. This is almost the same question as the first one, so the only challenge is understanding what count() does when given something other than an array.

About this post

Zend Certification Self Test was posted on Mon, 11 Apr 2005. If you liked it, follow me on Twitter or share:


1.JD said:

Other questions are good, but I don't think question 2 and 3 are of any use. They basically check whether someone can remember PHP function syntax which sadly is not consistent.

Anyway, looks like I should try to get the certification.


Tue, 12 Apr 2005 at 02:28:55 GMT Link

2.david said:

Is it me, or does C on #6 make no sense? If the code would not work, then the explanation does not make sense. The code snippet (presumably) is in a single file and is in multiple blocks. That satisfies the requirements listed in C and therefore does not explain why the code would not work.

Tue, 12 Apr 2005 at 03:24:33 GMT Link

3.Chris Shiflett said:

C is not the correct answer for question 6. More accurately, it provides the correct answer but the wrong explanation, which makes it an incorrect choice. You're right that it is easily eliminated, however, due to the logical fallacy. That just makes it a bit easier. :-)

Tue, 12 Apr 2005 at 03:47:34 GMT Link

4.Al said:

If anyone is interested php|architect offers a sample chapter from their book, 'The Zend PHP Certification Practice Book' by John Coggeshall and Marco Tabini. The sample chapter consists of 20 questions (and answers) about PHP Programming Basics. (Chapter 1).


Chris, (if I may call you that) thank you for the explanations and the heads up on the new self test questions.


Tue, 12 Apr 2005 at 04:26:11 GMT Link

5.Alec said:

I'm embarrassed to say I missed question 6, but I think I can make a pretty good case for answer C.

The statement "class definitions must be in a single PHP block" would seem to imply that you can't do this:


class Foo {

function bar() {

?> bar <?php




which you can. I don't really understand how you can say that the "class definition" for Foo in this example is in a single PHP block, and if it's not, then the explanation for B is wrong and C is the best answer, even if C's explanation ("class definitions must be in a single file but can be in multiple PHP blocks") is pretty much irrelevant to the code in question.

I understand that the first block ends and the second begins within a function definition and that's why it's okay, but that doesn't erase the fact that the class definition is in two distinct php blocks. I mean, the class definition starts with the line "class Foo {" and ends with the line "}". Both those lines are part of the class definition, yet they're clearly in two different php blocks. So the statement "class definitions must be in a single php block" is untrue.

Okay, I do protest too much, methinks. What am I missing?

Tue, 12 Apr 2005 at 05:44:08 GMT Link

6.Matt H said:


Although class definitions may be broken within method declarations, C doesn't state this, and so provides us with no reason to see the sample code as incorrect (this is David's point in comment 2). 6.b is incorrect in the big picture, but can provide a reason for the sample code not working.

I think this question could avoid the interpretive problem if 6.b referred to the code sample rather than to classes in general (something along the lines of, "won't work, this class definition is in multiple blocks"). This way the explanation could provide a reason for the code not working without contradicting the manual.

Tue, 12 Apr 2005 at 15:53:35 GMT Link

7.Per Persson said:

The reason I see for the code in Q6 to not work is that there is some whitespace between the two code blocks. That will be equivalent with an echo statement, which would be disallowed at that position:


class Foo


echo "\n"; // <-- Not allowed here!

function bar()


print "bar";




The same thing happens if you write a switch statement the following way:

<?php switch($var) { ?>

<?php case 1: ?>


The output before the case-code is not allowed to be there.

Thu, 14 Apr 2005 at 19:38:51 GMT Link

8.Kristian said:

Nice site Chris.

How relevant is question #5 for a certification like this? Yes, I missed it, but I don't think less of me as a php-programmer because of it.

Thu, 14 Apr 2005 at 22:24:15 GMT Link

9.Shaun said:

How accurate is this self test. I'm booked right now to take my test in a couple of weeks but I was wondering if the "Self test" covers all areas of the Certification test?

Fri, 15 Apr 2005 at 19:27:18 GMT Link

10.Jim Plush said:

Number 6 just says the class definition.. you can break in and out of php block INSIDE functions or methods, just not in between functions.



class Foo {

function bar() {

?> bar <?php




is perfectly fine. because you're inside a method call

Sat, 16 Apr 2005 at 14:55:07 GMT Link

11.Alec said:


Hate to beat a dead horse, but my point was that the answer says "class definitions must be in a single PHP block," and the class definition in my (and your) example is plainly not in a single PHP block. And it *is* perfectly fine, but it contradicts the statement used to justify 6b, the supposed correct answer.

If 6b had said "will not work, a PHP block cannot end or begin between the functions of a class definition," the answer would be fine. I hear what Matt H is saying, about how the answer should refer to the example instead of making a universal statement (a false one, at that). But even then, if it said, "will not work, *this* class definition is in multiple blocks" as Matt suggests, we can just point to our counterexample and say, "No, actually that's not really why it doesn't work. It doesn't work because the PHP block ends inside the class definition but outside of a member function."

Bottom line: the statement "class definitions must be in a single PHP block" (6b) is false. The statement "class definitions must be in a single file but can be in multiple PHP blocks" (6c) is true, even if it does fail to explain why the code doesn't work.

How can you say 6b, with the false statement, is the correct answer? I mean, being a false statement, it fails to explain why the code doesn't work, too. AND it's false.

6c is the best answer. That's my story and I'm sticking to it.

Sun, 17 Apr 2005 at 06:26:54 GMT Link

12.Al said:


Just to beat the horse again.

I completely understand what you’re saying and do agree with you to a point, but just to argue the opposite view.

The PHP manual states:

"You also can NOT break a class definition into multiple PHP blocks, unless the break is within a method declaration."

So an argument can be made that the rule is: You also can NOT break a class definition into multiple PHP blocks.

And a caveat to this rule is: unless the break is within a method declaration.

I know this is splitting hairs, but could be an explanation for the answer.

Sun, 17 Apr 2005 at 18:46:40 GMT Link

13.Alec said:


<melodrama>Ah, so the PHP manual itself contradicts the explanation for 6b! I stand vindicated!</melodrama>

Powers that be: I submit that 6b should be changed to "will not work, you can not break a class definition into multiple PHP blocks unless the break is within a method declaration."

Mon, 18 Apr 2005 at 00:36:19 GMT Link

14.tepp said:

on this self test i had 2 wrong answers and my total score was 6 / 8.

this implies that i was not penalized for wrong answers. does this reflect the true zend php certification conditions ? i.e. when the correct answer is not known for sure is it better to guess or to leave the answer blank ?

thanks for your help,


Wed, 20 Apr 2005 at 11:50:43 GMT Link

15.Ryan Wray said:

Here is my view on the Self Test, question by question.

1. Bad question. Who passes scalar values to count()? And how would you know the return, unless you were silly enough to pass a scalar value to count() in the first place (or memorize PHP documentation). I suppose, the coding style matches someone who may do that. The code should look more like

<?php count('123'); ?>

2. An okay question. Knowing the rules of the *print_f functions could be deemed important.

3. An okay question.

4. I think the question could of been good if it didn't require the user to know about octal and such. Maybe a simple comparision like:

$variable = 1 == 1;

5. An alright question. Though knowing the return is not highly important, it is I think a good example for new programmers who are learning about functions and returning values. However, for the purposes of an examination, maybe not.

6. Not that great of a question. Who would break up the code in a class anyway and even further to the point who would break it up there, where not even an echo/print statement would be correct. It should instead read:


class Foo {

function bar() {







In my opinion, giving some legitamacy to breaking the code up in the first place.

7. It is an alright question, though a bit subjective as already mentioned. I myself don't really like fill-in the blank questions - sometimes they seem complicated though they are quite easy.

8. Same a question 1, the only thing you have to know is how the count() function treats scalar values: the fact that one is an integer and one is string after that does not matter.

That is my opinion on the questions? Do you agree/disagree.

I have been wrestling with myself to decide if I should take the certification or not. Considering the what I consider the steep price ($200), plus the cost of the Study Guide ($29.99) I decided not too bother. The self-test doesn't encourage me (though it makes me think that the exam would be relatively easy to pass if you have good memory: more so than logic). Also, its popularity so far is quite low. It would be cheaper to take more reconised and respected exam!

I may take it eventually, but I am thinking I won't.

Wed, 20 Apr 2005 at 12:21:58 GMT Link

16.Certify This said:

I agree a lot with "Ryan Wray". I have been a professional php programmer now for about 5 years. I missed 6 of 8. LOL. Yet mysteriously I manage to create good quality PHP code on a regular basis.

I think a solid 'Certification' Question might be where would you find good quality answers to your PHP syntax questions?

I'm not much of a believer in "Certification" anyway. I don't try to memorize syntax as it does change from time to time. I DO however memorize the path to the best documentation.

Just 2 cents worth.

Fri, 29 Apr 2005 at 18:39:18 GMT Link

17.Arnór Heiar said:

I agree with "Certify this". The questions are way too much syntax-centered.

Personally I probably make about a 1000 syntax errors each day and it's not that I don't know how to code, but I make typing errors which I think is completely human :)

In most cases I can't remember the order of arguments, default return values og even function names for that matter.

Tests like this usually don't make much sense, but the way I see it it's a bit lame to be criticizing Chris Shiflett for his test. A test that has the only purpose of preparing people for the actual exam.

Another thing I want to point out is that most certification tests for programming languages are very syntax oriented and usually don't give a very clear picture of the participant's quality of code.

But then again, I'm not a certified php programmer.

Sun, 01 May 2005 at 00:19:31 GMT Link

18.Arnor Heidar said:

sorry about the icelandic letters

Sun, 01 May 2005 at 00:20:21 GMT Link

19.Arnor Heidar said:

I'm sorry, I thought Chris made the test. Should have read better. :S

Sun, 01 May 2005 at 00:28:01 GMT Link

20.Compuchuck said:


I know what you mean about syntax errors. My fingers don't always type what my brain is telling them. You may be able to help the cause by getting Zend Studio. The auto-fill of variable names and presentation of function parameters could really help you waste less time correcting misspelled variable names and missing parameters. And the syntax checking will help you not save files that have a syntax error.

To Zend: you can send the commission to my Paypal account. 8^)

Sun, 01 May 2005 at 03:57:30 GMT Link

21.Morgan Craft said:

I have to agree ryan Wray as well. I've been programming with php for close to two years and I only got 3 of the questions right. The first and last one, why would I know what happens when you stick crap like that into count? I've used count several times, mainly for checking the number of elements in arrays, why would I place a string in it? The fill in the blank question about register_global and whether it enchances or injects, wth? Injects? you can kiss my $_POST['a$$']; not taking this cert. =P

Wed, 11 May 2005 at 05:29:56 GMT Link

22.Steven Van Poeck said:

If this test reflects the way how the certification tests are run, then I think the certification will not prove much worth.

What is the point of memorizing function syntaxes when they can:

a) change over versions and

b) be consulted in the documentation.

So I mainly agree with Ryan Wray.

A Certification Program can be of help to enhance "professionalizing" PHP in the eyes of decision makers, but the way it is run does not certify that a PHP Certified engineer will write good code...

Wed, 18 May 2005 at 09:53:27 GMT Link

23.Stuart said:

To Kristian,

I also missed question #5; however I feel the question is quite relevant...part of our job as programmers is paying attention to details. I, and I'm sure all of us, have encountered bugs in our programs that stumped us because we were looking for something complex when in fact we overlooked something simple!

Wed, 18 May 2005 at 20:29:43 GMT Link

24.ni2k said:

I am php pro for 4 years now. Missed 5 of 8.

Aggreeing with Ryan Wray: If the exam is like this short test, it's not worth anything. It just shows, that there are somewhat silly people, filling there heads with information that haven't to be in their heads as it is in the manual. Good programmers (or the ones I consider to be good) keep their brain free for procedural logic and good design. If our brains must carry all the information found on computers and through the WWW, what are computers and what is the WWW good for?

I - for instance - would have to keep up to 8 laguage manuals in my head, if I followed this approach. My girlfriend would be discouraged, cause there wouldn't be any place left to "save" her name or birthday.

I think keeping your mind free of manualdata is worth more than some exam no one really needs to be a good programmer.

Thu, 19 May 2005 at 12:55:27 GMT Link

25.Hamad said:

it seems like good overview for the exam, it gives you an idea where you are standing in php coding :)

Sun, 22 May 2005 at 05:42:37 GMT Link

26.Haseeb said:

I think it is a nice effort to make oneself familiar with the Zend PHP test. Although questions were quite different and were nicely organized, i think atleast an experience of 4 months in PHP development will be necessary for appearing in the test.

Mon, 23 May 2005 at 08:12:25 GMT Link

27.Paulo said:

I´m with ni2k when he says we dont need to keep all the syntax inside our brain.

If I did that, I would be like an encyclopedia with all that data... thats what manuals are made for.

Good programmers knows the logic and can implement it in wichever language they need to...



Mon, 23 May 2005 at 16:50:50 GMT Link

28.Artyom said:

PHP pro for 5 years, missed 4 of 8. There's something not right with these tests - they all claim to reflect real world hands on experience, and instead they focus on the syntax and odd function calls like count("blah"). If someone would ever want to know what would this strange construct return, he could type that in and see, eh?

I will consider taking this exam, but combining its price and its uncertain value in regards to the exam content, I'm hesitating.

P.S. Used to pass the Brainbench PHP Master certification program with a top score in their listing, and didn't bother to retake the exam when the cert expired. The reason is the same - synthetic tests have little real world meaning, but sadly, they seem to convince employers (probably for the lack of other reasonable means).


Wed, 25 May 2005 at 02:58:34 GMT Link

29.Jaygiri said:

Only 3/8 :(

But it teach me that I should remember the era when there was no code hints are available. And I should remember common function and its CURRNET syntax. I should not forgot the funda of PHP (and C). If I am opening manual every time for syntax of common code I should not call my self Pro!

Anyway Hasitating Test! NO?

Wed, 25 May 2005 at 07:10:14 GMT Link

30.Conrad said:

Hi, I'm very new to PHP and I'm in the process of learning it. Anyway, I was able to get a 1 out of 8. In any case, I will give myself several months before I consider taking the exam and I would like to wish everyone the best of luck with the certification.



Thu, 26 May 2005 at 02:20:37 GMT Link

31.Dhiraj Patra said:

As I am a software engineer and developer, very much fond of PHP. It is a very good test. But I thing nor text written answer should not be there. As Q-5. answer can be given 'nothing' instead of null because null is not equivalent to nothing and here most appropriate answer would be nothing not null. best regards.

- Dhiraj



Sat, 28 May 2005 at 05:19:37 GMT Link

32.Thomas Gruner said:

Wow! Missed 5 out of 8. I have stuck to writing my classes without trying to echo "Hello world" in the middle... and I don't use the count function on strings. But, hey I can start echoing things in my functions and using count on strings. Just give me the pretty certification. Octal 100%!

Mon, 30 May 2005 at 10:24:53 GMT Link

33.BrijKumar said:

it is very logical question.a people who have deep knowadge about php he can solve it.

I request to plz you send more question like this

Tue, 31 May 2005 at 06:18:12 GMT Link

34.anon said:

I've programmed about 250 lines of PHP over the course of 1.5 years. I got a 6/8. I missed #3 and #5. I should have known better on #5, because it's general C-style programming.

I won't be getting certification, but I will be learning more PHP.

Wed, 01 Jun 2005 at 07:54:57 GMT Link

35.ccp said:

I write decent code for my limited php experience. I have sound programming principles from studying other languages and PHP enables me to do things with stateless http that I could only dream of previously.

I got a 2 out of 8. I'm not ashamed to used the ref manual when I have to. Do u know why? Because anyone who passes by my PC says that the code looks like an asain language and to me it makes perfect sense.

I don't have to be labeled pro. Anyone who programs is forever a student.

Wed, 01 Jun 2005 at 08:21:31 GMT Link

36.Shurik said:

Q7 seems to be the worst question because of the "enhance" vs "inject". If one of these dodgy choices removed, Q7 potentially could be the best question as it does not test the syntax but the PHP knowledge.

I'd suggest logical sections in the test. Not all questions shall be syntax related or test the memory of the function help.

Where the purpose of the test is not to check the rough memory but the developer logic and engineering skills, I would suggest printing the short standard function description next to the question where it is used.

Fri, 03 Jun 2005 at 03:47:25 GMT Link

37.incous said:

Well done, you will be the master of PHP when do the perfect.It's not too difficult but you have to learn all of PHP (even tiny things)

Fri, 03 Jun 2005 at 03:55:06 GMT Link

38.Karolis Tamutis said:

I'm somewhat dissapointed with the questions. Got 6 out of 8, also missed 5th (hey, it's 5 AM here), but I was hoping to see more OOP / app design type questions. As someone mentioned, memorizing function parameters can't teach you to code better.

Mon, 06 Jun 2005 at 01:58:05 GMT Link

39.Phu said:

Honestly, come on. I came across something about Zend PHP certification and thought I'd check it out... there's absolutely no way I'd pay $200 to be asked asinine questions about outdated functions and the results of poor programming practices.

I've been writing PHP applications with mySQL back ends pretty much exclusively for about three years now... and I managed a 2 out of 8. If this is how Zend tests programmers, I am truly confused as to how the language is still alive.

Mon, 06 Jun 2005 at 05:55:14 GMT Link

40.Klaus said:

i do php coding for about 3 years now and when i first tried this self test i *shame* missed 5 questions including the two with the shitty use of the count() function.

Did one of you try the brainbech PHP exam? It's a bit tougher than this self test, but its worth taking it to see how mean questions can be ;-).

I think the focus of the php certification should be on debugging skills instead of plain syntax checking like some of these questions.

BTW: i try my cert exam at the end of this week.

Mon, 06 Jun 2005 at 17:39:51 GMT Link

41.XAnkth said:

I'm afraid I agree with what most people are saying here. Memorize-this-syntax exams have been recognized as a bad way to test *anything* for a long while now. You guys really need to update this exam (or just these sample questions).

Sat, 11 Jun 2005 at 06:43:21 GMT Link

42.Yurgh said:

Scored 3 of 8 with 5yrs experience ;)

Most of these test questions doesn't really reflect "real life", as most of the code doesn't make sense. I can honestly say I've never count'ed a string, and I don't see myself doing it in the near future. :)

However, having a certification to show for is (usually) excellent for job interviews or getting a raise. Since most executives have absolutely no idea on what you're really doing - just about any framed certificate will do.

So, I'll be getting the Zend self-study-book, and brush up on unlikely use of PHP to get this on the wall :)

Sat, 11 Jun 2005 at 13:20:32 GMT Link

43.red said:

uhm, 6 years professional practice, several complex projects (e-learning plattforms, custom made content management systems, etc) a year... and got only 2 of 8? hm, well, I just never bothered to learn all the syntax-details by heart. php.net has a great documentation... so, why should I? just to get the certification?

Mon, 20 Jun 2005 at 08:24:48 GMT Link

44.Jon said:

I'm BRAND new to PHP, the only thing I know is the echo statement! Still I got 2/8 right, same as some old pros! It's encouraging.

Thu, 23 Jun 2005 at 00:47:09 GMT Link

45.Stefan said:


there is a syntax error in question 3/ option E.

A right parenthesis is missing.

Is this done by purpose to make the test even harder or is it just a slip of the pen?



Sat, 25 Jun 2005 at 09:28:12 GMT Link

46.ekt said:

Reading some comments here, people seems to be disgusted of passing a string to the count() function. Of course, no one would normally do it. But I can imagine trying to hunt a bug in a code where some variable, expected to be an array, happens to be a string when calling the count(). I'd consider myself a more effective programmer knowing what the return value is in such a case. This and other tricky questions like this are not that far away from real world.

Sat, 25 Jun 2005 at 19:37:13 GMT Link

47.Chris Shiflett said:

Stefan, I've corrected it. To answer your question, no, there are not questions that are that tricky. However, I personally think that there is a great deal of value in being able to quickly identify such an error.

Sat, 25 Jun 2005 at 21:40:13 GMT Link

48.Harshit Sekhon said:

Hmmm ... interesting set of questions. They make you wonder, "what on earth have you been writing those thousands of lines of code per application for when you can't answer basic syntax questions". :)

As for Q1. I wonder why php sees a string literal as a single argument when passed to count when the same literal assigned to a variable is represented somewhat like an array. Remember the index based access of string elements? Weird huh?

I am seriously considering taking the test, but whoa! would you look at the exam fee and the books' prices. Aren't there pdf-only versions which can be sold cheaper or maybe even EEE's (Eastern Economy Edition). Thats 8,600 INR for the exam + 2300 INR for the 2 recommended books (approx). So I guess I'll have to put it off until the exam is more recognized or until the time I have enough to spend on something like this. :(

Tue, 28 Jun 2005 at 21:15:35 GMT Link

49.Alex said:

I'm pretty sure answer three is valid for question three as well. I pasted the code into a PHP page:


Content-Type: text/xml

ontent-Type: text/xml




Looks to me that both C and D are valid.

Tested on PHP Version 5.0.4 :)

Wed, 29 Jun 2005 at 11:34:01 GMT Link

50.Naif Meelbi said:

Hi, I got 6, I think it`s good from me. But I did not find the enough answer but, finally, I know why the answer is.

Anyway, (En Shall Allah) I will take The Certification.

I am looking for the best place to get it in my country (KSA)


Sat, 02 Jul 2005 at 20:32:33 GMT Link

51.DiZpel said:


Both C and D seems to be correct because the extra white space is stripped. C returns ' text/xml', and D returns 'text/xml'. This means D is correct, and C isn't.


Tue, 05 Jul 2005 at 09:35:25 GMT Link

52.Praveen Kumar M [INDIA] said:

This sample test helped me to test myself in PHP.

Thu, 07 Jul 2005 at 04:29:02 GMT Link

53.moh bahdoon said:

I agree most of the comment writers. Particularly, those who wrote that self-test is very much syntax oriented and does not test the professional and good quality of PHP.

Thu, 07 Jul 2005 at 16:43:20 GMT Link

54.Nermin Hanjalic said:

I totaly agree with JD, the questions 2 and 3 simply does nothing to do with reality!

I have 6 years of webprogramming experience an i dealing all the time with actionscript, java, mysql, access, xml ,php ... and i SIMPLY DO NOT ALLOW to myself to memorise all that stupid stuf like all this output-formating, dates parameters etc. If i need it ill look in the ref. I mean what for r the references for? Remembering the stuff like that ist just LOOSING THE TIME. And by the way(laudation not intended) i'm Certified Flash MX Developer,

Certified MySql Core Developer,

Sun Certified Programmer for Java 2 Platform 1.4,

and on none of the exams above, i found questions like that.

But i liked the other once particularly Q. 4 and 5 .

Thu, 07 Jul 2005 at 19:14:37 GMT Link

55.dEEPS said:

hi all,

i just missed ques 5. I was half right. I knew the function didnt return anything, but i thought the answer would still be 2, rather than null.

all the best to all of u for the actual certification.



Fri, 08 Jul 2005 at 01:50:37 GMT Link

56.CK said:

I think you 'pros' don't understand the purpose of some of these questions. I got 7/8 (missed the octal one) and had never put a string in 'count()'. I used LOGIC to understand that the count would be 1. They ask questions that you do not know the simple syntax for so that you have to think about the way PHP handles types and actually derive how things work. Perhaps many of you do not have computer science degrees and are simply programmers, in which case it is understandable. It is also understanable that Zend does not want to certify you as 'elite'. I'm not trying to insult programmers or technical institute graduates, I'm just saying that comapanies want the certifications to hold merit, and since they cannot review your code, they ask questions that require a thought process where the most logical answer is derived, which requires more indepth knowledge than syntax and HTML forms

Fri, 08 Jul 2005 at 05:25:01 GMT Link

57.PATTERSON said:

"Alex writes:

I'm pretty sure answer three is valid for question three as well. I pasted the code into a PHP page:


Content-Type: text/xml

ontent-Type: text/xml




Looks to me that both C and D are valid.

Tested on PHP Version 5.0.4 :)"

Can you verify that it didn't print out '{space}text/xml'?

Wed, 13 Jul 2005 at 07:13:08 GMT Link

58.FM said:

null is not strictly the right answer to question 5. If function does not return value, the variable will not be set at all. Call isset() on $result and see it yourself!

Interestingly, is_null will return TRUE on the variable, which is not set but direct check with === operator will show that variable is NOT null!

Mon, 18 Jul 2005 at 06:25:35 GMT Link

59.premlal said:

This test is worthfull for checking the knowledge

base. But for any programmer the primary thing needed is logic.

This test is very good enough for freshers. experienced guys may be unaware of some syntax.


Tue, 19 Jul 2005 at 14:14:13 GMT Link

60.karlosprog said:

beleza galera, tô começando agora com php e confundi a cabeça com 3 questões, mas as outras 5 acertei blz.


Sat, 23 Jul 2005 at 20:39:40 GMT Link

61.Junior said:

Acertei 6/8, teve uma que coloquei false, mas era null, foi a que a funcao nao tinha result, foi falha minha.. o jeito é prestar mais atenção..

Sat, 23 Jul 2005 at 23:43:44 GMT Link

62.cdanea said:

Well... I was very interested in the certification, but very dissapointed by the test sample. I've been working with PHP for 5 years now, writing proffesional applications, and although got 7/8 (missed the octal one), I must say that I am skeptical about my chanses of taking such a test.

I used common sense for anwering most of the questions, and common sense is not a good foundation for getting a certification. I will not spend all that time and money to read the reference books, since I'm expecting a refurbished reproduction of the manual for those "really important" aspects that are "relevant" for this test.

I was seriously looking for information about the certification, but my curiosity fot this test saved me. I'm sure that this sample test has changed a lot of people's intentions about getting certified. You should consider removing this page from your certification marketing area of the site, because you are actually losing customers.

Sun, 24 Jul 2005 at 10:25:56 GMT Link

63.cdanea said:

PS I was curious on how many people actually did get the certification...

154 Americans (employers there really love cretifications)

50 Germans !?

24 from the UK

9 French

1 Indian !? - indian developers have a very large share of the PHP application market (in Europe especially), and are highly regarded for their expertize and professionalism

Sun, 24 Jul 2005 at 10:40:32 GMT Link

64.Caloã said:

Teste ínútil.

Não quer dizer nada na programação.

Esse tipo de pegadinhas são descobertas fácil quando você está programando.

Ínútil test. It does not want to say nothing in the programming. This type of errors is discovered easy when you are programming.

Tue, 26 Jul 2005 at 22:04:57 GMT Link

65.mano said:


Yes, this selftest is useless. It may tell you that you are ready if you had luck and tells you are stupid even if you develope pro stuff.

I know my level and it is not beginner, but I have never tried count() with nonarray and even if I do read manuals a lot, I didnt notice that. Someone mentioned that it should be known, caz yes, If you passed somehow a scalar value to the count you may notice the bug by always getting 1 as result.

The function with the null is also good to know. Someone said that it is not null because it is not set by isset and the $result===null does not work. For those: Read more manual, this was for you. Not set variables return NULL by default and

$set=null; $is_set=isset($set);

will make $is_set false because that is the definition. Zend engine or whatever, it is said so in the manual.

Methods with no return also set the variable to null.

To make summary, I think this 8 question tried to encourage people trying the test. If you check the list of required knowledge, you will notice that you supposed to know everything. Sure, If I would hire someone and I filter the candidates by a certification, I want the certification to ensure the quality of the programmer. So probably in a couple of year this 'paper' will worth some.

There is a book recommended in one of the posts, the example chapter contains some 'real' examples for the exam. Those are cool, because if you know whats going on, you sure what to answer.


Makes more sense...

Anyway, It is expensive for me to take at the moment, so I probably will delay it, but wont forget about it.

Zend: Take this self-test down as soon as possible caz you are losing your future certificated programmers and with this meanless 'test' you slow down the process of an exam what should be wide-spread.

Why do I say this? Is there any of you who lost job/project of a programmer who worked for less or ask for less? Do you ever felt that the client will never see the difference between quality stuff and crap?

They should have come up with this earlier!

Take care!


Wed, 27 Jul 2005 at 19:41:44 GMT Link

66.André Luiz F. Rodrigues said:

Very very good test... in Brazil have 3 certifield guys... i expect to be the next!

Any questions really are confused, but if analise well get answer without problem!

Thu, 04 Aug 2005 at 02:59:18 GMT Link

67.simon said:

I&#8217;m curious about the perceived value of being Zend Certified. The questions seem to be based on memory of the PHP manual, what is the real world benefit of this?

When developing you typically -have access to documentation and the ability to view output directly, why bother to commit obscure facts to memory? A more appropriate form of certification would include design considerations, which are key to developing robust PHP applications.

Fri, 05 Aug 2005 at 12:46:41 GMT Link

68.Arnold Smyth said:

I answered FALSE for question 5 and was given an incorrect. If you evaluate the variable for FALSE or NULL you will find that it can be either.

Tue, 09 Aug 2005 at 12:05:22 GMT Link

69.chris said:

function timesTwo($int)


$int = $int * 2;


$int = 2;

$result = timesTwo($int);

arg, i answered 4, damn perl!!

Funny, when i first heard zend was doing a PHP cert, I naturally assumed the PHP manual would be available for it, since the biggest distinguishing factor i've noticed over the years between good php programmers and bad php programmers is ability to consult the manual when necessary and use it effectively

Thu, 11 Aug 2005 at 06:20:05 GMT Link

70.Aaron Wormus said:

The PHP Manual is not availiable during the test? That is the trouble with these tests. Who codes without a computer? I usually use a computer to do my coding, and on my computer I have the PHP manual.

I don't understand question 7 . What does

"When turned on, register_globals will inject your script with different variables from HTML forms and cookies." Mean?

Fri, 12 Aug 2005 at 05:17:01 GMT Link

71.KVJ said:

If Zend certification means distingusing good PHP programmer, then these set of questions do not make much sense, as these questions probably test the debugging skill not the logical and analytical skill of programmers, because in real life no one will intentionally write count("eerer") and check what will be output.

Also about remembering the syntax is concern, may I know is there someone who remembers all PHP or any other language syntax?

I would love to see questions in test, which reflect a good programmer logical skill in PHP.

Sun, 14 Aug 2005 at 04:02:23 GMT Link

72.Albert said:

I have been using PHP for the last three years (almost exclusively) writing rather complex web applications with it.

What I have found is that I extensively use the manual as a reference for syntax. Even when programming in C or Delphi/Kylix I use the manual.

Taking this self test, I though that it would test my general knowledge about PHP. Surprisingly it tested me for syntax.

Wouldn't it be better to test knowledge sound programming priniciples?

I would like to know how regular expressions work, how to interface more with the operating system, etc.

I liked the Octal question (#4) and the one on the classes (#6).

Testing if I know the syntax for count() is stupid. If I want to know the length of a string I use strlen(). If I want to know the number of elements in an Array I use count(). If I'm not sure I use the Window CHM manual as it is searchable.

I do hope that the ZCE qualification exam is not as stupid as this self test. If it is, then I cannot see any reason why I should rather hire a ZCE qualified person than someone who is not ZCE qualified.

Wed, 24 Aug 2005 at 07:37:05 GMT Link

73.Streaky said:

Question 1, 2 & 8 are silly / pointless, the rest are very basic - most people with a little knowledge of php should be able to answer them.

Therefore they tell you nothing about the person that took the exam, so I won't be bothering.. not yet anyways, I'd rather let my experience do the talking.i gni

Wed, 24 Aug 2005 at 18:30:19 GMT Link

74.Seba said:

I am a PHP developer for over 2 years now. Coming from JSP, I found PHP a very simple to learn language, very well supported and documented.

I understand that PHP is a Rapid Application Development Language, but considering yourself a professional based on memory is a big mistake.

A true WEB developer, must be well educated and experienced in WEB applications design, approaching the right way the clients specifications and finally producing a solid, scalable and secured (which is the most important issue) application, that wouldn't let the client out of money or confidential data because of some security hole and that would give future developers a core to build on new features easily.

If this set of questions reflects the real test level, than any "professionals" who own ZEND CERTIFICATES, must know that the certificate shows they're ability to create a guestbook or a contact form without consulting the manual (than why does it exists?)

I got 4 questions, but I don't feel bad about it.

I just don't consider this test PHP relevant, otherwise why did they worked so hard on the ZEND2 Engine? not to create a much more powerfull language out of php? Understanding this new features (OOP support), and what developemnt posibillities they open is the stuff that should be tested.


Thu, 25 Aug 2005 at 13:18:01 GMT Link

75.JamesBenson said:

Personally I cant see how I was supposed to know the answer to the questions about the count function, ok im no expert but without sticking count('123') into a file and running through PHP im not gonna know because I already know count() counts array alements and strlen counts string lengths so would notice this is wrong as I did and it takes an array as argument but never tried to stick some numbers in just for the sake of seeing whats returned.

Tue, 30 Aug 2005 at 20:31:09 GMT Link

76.JD said:

Oh dear :( 3 from 8

Just for the hell of it I decided to try this test. 2.5 years php coding moderatly difficult web applications. I would not say I 'know everything' but believe I have a damn good knowledge to put a decent site together.

I just memorise where the best documentation is and where the best help can be found. Perhaps I should remember all the syntax and forget the wifes birthday.

Thu, 08 Sep 2005 at 13:07:21 GMT Link

77.bob kennedy said:

So question #1 doesn't require a semicolon?

Wed, 21 Sep 2005 at 18:07:44 GMT Link

78.Sean Benoit said:

Thats correct...question 1 doesnt require a ; .... People getting "butt hurt" (quoting chico) because they missed a couple "easy" one's?

Sun, 25 Sep 2005 at 18:55:21 GMT Link

79.Siva Prem said:


function timesTwo($int) {

$int = $int * 2;


$int = 2;

$result = timesTwo($int);


Question 5 :

Was every fast in answering this, and gave wrong answer as ";". (check the last ";" in the question, which mislead me and forgot what question was :) ).

Wed, 28 Sep 2005 at 01:29:49 GMT Link

80.Brandon said:

nice, pretty test.

Thu, 29 Sep 2005 at 07:04:46 GMT Link

81.Josh Fox said:

I have been programming with PHP exclusively for 4 years now and feel that I can make it do anything, although I only got 2/8 questions correct. With PHP you are always learning and improving you skills. The test is fine, but any practice test for any cert is always book oriented and not real life in comparison.

Fri, 30 Sep 2005 at 17:43:08 GMT Link

82.Pepito Grillo said:

Yeah, no. 2 and 3 are not really to be included in a certification exam, since in real life you always have the PHP Manual at hand. Maybe it will take you two or three attempts, but you will find the way after all...

Fri, 30 Sep 2005 at 23:13:56 GMT Link

83.Scoobs said:

Je programme depuis au moins 4 ans avec PHP, j'ai l'impression que je peux faire ce que je veux avec PHP mais comme je n'ai jamais fait de cours d'informatique de ma vie, je me disais que je pourrais faire valider mes connaissances avec cette certification.

Erreur !!! 0/8 ! Mais bon, quand je code, je ne fais pas des count() sur tout ce qui passe pour voir ce que cela donne. Et puis franchement, pour moi, une des plus grandes forces de PHP, c'est php.net (ah... si seulement mysql.com était aussi bien fait !).

Thu, 20 Oct 2005 at 18:49:45 GMT Link

84.Darkwing said:

Details are a programmers live and they should be given great attention. Knowing the syntax rules of the language you use are the base for a good programmer.

This certification is not here to test if you are a great programmer or if you've got the correct coding style. It is here to test your knowledge of php. I never programmed in PHP (except for "Hello world") before, but I missed 3 because of my insufficient knwoledge of the php syntax.

That is how it should be.

You should be able to program a compleet piece of code, after approx. 2 years, without using an ide and know that your code is right. This wont be achieved if do not know about the php syntax.


it's better to loose oneself then to loose but a minor detail

Mon, 24 Oct 2005 at 14:59:34 GMT Link

85.kk said:

It seems the test of memory and experiance rather than logic and talent. There can be better questions like #3 for the experienced people.

Fri, 28 Oct 2005 at 07:30:49 GMT Link

86.cberry said:

Closed book just doesnt make any sense. Being able to use to PHP manual correctly and efficiently is every bit as important to a programmer as memorizing reems of methods.

I dont have a problem with the questions as such (testing genuine programmimg ability in this way is difficult), just the fact you cant use textbooks/ the net to help you answer them.

Tue, 01 Nov 2005 at 12:39:06 GMT Link

87.Bryan King said:

There is a typo on Question #5

The code is:


function timesTwo($int) {

$int = $int * 2;


$int = 2;

$result = timesTwo($int);


This code returns a Semicolon on the page. Not Null.

Thu, 03 Nov 2005 at 20:28:25 GMT Link

88.Bryan King said:

Duh, I misread the quesiton. LOL. That got me.

Thu, 03 Nov 2005 at 20:29:17 GMT Link

89.Dharmendra Ajwani said:

I think , syntax does play a good role in life of Programming Expert. But logic is important too. If you know the syntax but have no logic you cant do anything. But if you dont know syntax but you have logic you can some how manage, as syntax you can get from net or manual's but you cant get logic from anywhere.


Fri, 04 Nov 2005 at 05:12:02 GMT Link

90.John-Henrique F. Silva said:

Gostei do teste, muito preciso porem sao poucas as questoes apresentadas...

Tue, 08 Nov 2005 at 23:26:04 GMT Link

91.Ralph Almeida said:

manero o teste, ate q fui bem =]

kem sab nao tento a certificação!

Wed, 09 Nov 2005 at 16:05:17 GMT Link

92.Michael Drinnan said:

Sadly I only got 3 of the questions right, but I am very interested in PHP. Will Continue, thnx.

Wed, 09 Nov 2005 at 19:21:01 GMT Link

93.Noel said:

Q4 is BS:

~ # php -r "$a = 123 == 0123;"

Parse error: parse error, unexpected '=' in Command line code on line 1

WTF, you can't do that...

7/8 for me...got 6 wrong cause I never thought to do something so dumb.

Fri, 11 Nov 2005 at 02:43:02 GMT Link

94.Chris Shiflett said:

Noel, you might want to make sure you're right before you call something BS. :-)

That's perfectly valid syntax. Your method of testing is flawed. I'll let you figure out the rest.

Fri, 11 Nov 2005 at 04:23:18 GMT Link

95.Fat Albert said:

I'm fat. You all suck. Lets do lunch.

Fri, 11 Nov 2005 at 13:44:10 GMT Link

96.Rui Gomes said:

This is a good test, i belive it tests the developer from an engineering standpoint, testing the student for profound knowledge of the language. Secure and advanced applications are not built with simple sintax knowledge, and you wont allways be working over your own code.

You shouldn´t get the certification if you are thinking in developing web forms and simple applications.

I´m taking computer science and got 2 out of 8. I have been working with php for 5 years and this result will change the way i use the php manual.

Best regards from portugal (2 ZCE´s)

Rui Gomes

Tue, 29 Nov 2005 at 22:11:49 GMT Link

97.Christopher kalu said:

Hey Stefan the missing parenthesis from Question 3 is at the end of Question 5

What is the value of $result in the following PHP code?


function timesTwo($int) {

$int = $int * 2;


$int = 2;

$result = timesTwo($int);


Wed, 30 Nov 2005 at 22:14:53 GMT Link

98.WP said:

I dont's think q2,3,6 were useful....

Anyway I will get the Certification

Thu, 08 Dec 2005 at 14:04:37 GMT Link

99.Prabir Dutta said:

I didn't understand the part where leading zero in any number can format is treated as octal number in PHP, i didn't find the same.

Mon, 12 Dec 2005 at 13:00:31 GMT Link

100.Bharathiraja said:


I got 4/8.

I am working php in last 6 months. I am interesting to write the zend certification exam. The practice exam is very well, that is used to improve my skills and also i think i know only the little bit in php. Afterthat I hardwork to learn more about PHP and I would like to attend the zend certification exam. This certificate is very near by me.

Tue, 20 Dec 2005 at 10:30:15 GMT Link

101.Madhur Kumaria said:

I am working php in last 7 years. I am interesting to write the zend certification exam.

Its was a nice self test in which i scored 7 out of 8, so I think I must go for this exam.

Thu, 22 Dec 2005 at 12:56:08 GMT Link

102.Vitas said:

Yahoo! 8 of 8! I'm good!

Mon, 26 Dec 2005 at 07:24:59 GMT Link

103.Sudhir Chauhan said:

i got 8/8....



Tue, 27 Dec 2005 at 13:38:55 GMT Link

104.PUNEET said:


Thu, 29 Dec 2005 at 00:18:44 GMT Link

105.Alex said:

All of these questions have absolutely no sense for real php-development.

Thu, 29 Dec 2005 at 17:04:21 GMT Link

106.ashish said:

i got 6/8 i will try to get 100%

Tue, 03 Jan 2006 at 12:35:11 GMT Link

107.guest said:

ashish, I know you executed code locally and got the 6/8


Try to get 100% but without cheating...

Tue, 03 Jan 2006 at 13:03:25 GMT Link

108.K Therrault said:

I am simply amazed at the negative comments coming from all of the people who crapped out on this simple little test. I have been programming using PHP for about a year, and right off the bat, I got 6 of 8 of the questions by simply evaluating the questions logically.

Come on people, this was pretty simple stuff really, putting down and flaming a certification exam because you do badly on it is very childish and highly unprofessional. If a person does poorly on an exam, would they not be eager to study harder and re-take the exam until they passed? My suggestion is to read the questions thoroughly, they all make perfect sense if you read them correctly.

Personally, I think the ability for one to know a language inside and out, and understand even the most obscure and miniscule functions and constructs is very important in the real world. If I were hiring someone to build an enterprise level PHP app, and they couldnt answer a few simple easy to understand questions about the language the application was being written in, would I hire them to build tha application?

Probably not. Would you?

Plain and Simple.

This is just one mans opinion...

PHP rocks!

Wed, 04 Jan 2006 at 03:18:25 GMT Link

109.Doesnt Know PhP at all said:

Its funny that people are acting like this is the first test ever for a computer language. I passed the java one way back like 8 years ago and its all the same arguements. All certifaction is for is so you can say "Look I actually know some of this" its not to say how good you are at it.

And BTW I have never programmed in PhP and I got 5 out of 8. I was looking for the pass mark to the exam as my brother is taking it.

Fri, 13 Jan 2006 at 03:27:35 GMT Link

110.Rocky said:

Well... I got 6/8...

But are this questions really on the _exam_? I mean these have nothing to do with real php programming. Well sort of.

I'm just interested if this self-test is relevent or are the questions (as were cases in other exams :P) on the exam harder?

Hope somone could be so nice an give an answer. Thnx!


Mon, 23 Jan 2006 at 12:44:23 GMT Link

111.Dhanasekar.G said:


Wed, 01 Feb 2006 at 11:21:25 GMT Link

112.Mike Walters said:

I've been coding PHP for over 10 YEARS (since the very first release of PHP/FI back in 1995).

While I faired ok on these practice questions, like most of the other veterans who've posted comments, I don't see much use for them. Why would a professional ever type (as seen in Question #8):

echo count(strlen("anything")); ?

I guess it could be a cool covert way to echo the value 1. Of course, so is echo chr(49); or echo similar_text("x","x"); or worse echo strlen(strlen(trim(substr(bin2hex(ereg_replace(strtolower(ucwords("bar")),"foo","bar")),0,3))));

But why in the world would I ever do this? I think I'd probably just type echo 1; :/

And if, FOR EXAMPLE, I was cleaning up code behind someone else and I saw something like this, I would probably just giggle and re-write the whole prog.

A good profiency in the language is what they're attempting to test for, but I think it's obvious that no serious programmer is going to remember what the 3rd arg for html_entity_decode() is. And therefore, these types of questions seem somewhat meaningless to real professionals.

I'm considering doing some certs and this was one of the certs I was interested in. While I'll probably still get the cert, I have serious concerns about what the certification certifies. It looks to me like a ZCE is basically a master of the ZCE exam as opposed to actually having a working knowledge of the language. I hope someone will help ZEND rewrite the exam to be a little more practical and professional.

I have a quick practice exam for ZEND:

Q1: What would the following question prove?

"What would the following produce?

echo strlen(strlen(trim(substr(bin2hex(substr_replace(strtolower(ucwords("bar")),"foo",0),0,3))));"

ANSWER: Nothing. Don't ask a dumb question on a professional exam.

What's my idea of the ideal exam, one might ask? How about a series of scripts to perform certin tasks. Give the programmer a certain amount of time and all the resources of the Internet and documentation and ask him/her to program 5-10 scripts which challenge his working knowledge of the program. Results are graded on efficiency and optimization.

Sat, 04 Feb 2006 at 21:23:27 GMT Link

113.hafizan said:

I code since 2001 i got two from 8 weird.I based on on logic.Heavly code in oop.

Tue, 07 Feb 2006 at 03:54:17 GMT Link

114.SK said:

Before I start, I want to say that I got 6/8. And no, I wasn’t very pleased with that score, since I am quite well-versed with the PHP language - not that it’s too hard to be! But I definitely have to brush up a bit if I'm going to take the certification exam.

I made one silly mistake - question #4; it’s been a while since I've had to deal with non-decimal numbers. The other mistake that I'd made was with question #5, where I thought all this while that PHP functions return a zero when there isn't an explicit return statement. But then I know that (null == 0) will return true, so ($return == 0) is true - which is the reason for my (false) belief. However, if you do a strict comparison, ($result === 0) fails, while ($result === null) holds true.

You never know when this knowledge will be useful!

In one particular project, the return types were so important that I had to use strict comparisons throughout the code. Otherwise the script would behave erratically under different conditions, but all within reason which I later found out.

As for the issues some of us have with the questions involving count(), all I can say is that it doesn't hurt to have a thorough understanding of how something works. And you never know, that tiny piece of information may be all that you need to solve a mysterious (as some users call it) bug - ofcourse there are always a million other trivial work arounds.

I noticed someone complaining about question #8. If you haven't heard of register_globals, then I suggest reading up on PHP security issues. It's important you do this, for you never know, you could be carrying on terrible programming practices, leaving the system wide open to attacks - only if that sort of thing concerns you, unless you leave that sort of detail to the quality control team. I'm not saying that register_globals is strictly banned, especially since some shared hosting providers have it turned on, which means you have to know what the security implications are in order to keep the app fairly secure. You must acquaint yourself with the various INI file settings, as it may affect application design – this is very important when it comes to file uploads and high volume database access.

I haven't done a study on it, nor do I have statistical figures, but I can still say with confidence that given access to the PHP manual, most PHP programmers would eventually get the job done.

We had a couple of PHP programmers whom we later discovered didn’t have a clue as to how binary data is saved in the backend. But they eventually managed to get the job done. Then when we used another app to retrieve the binary content, we found out that it wasn’t stored in binary. After a bit of mucking around we realized it was stored in Base64 format – what a huge waste of storage space. And the reason they converted the data from binary to Base64 was because they didn’t have a clue as to how to store the actual binary content! The work around got the job done, but it wasn’t done right and it was taking up a huge amount of unnecessary storage space (roughly by a factor of 7). By the way, SQL Server’s image data-type requires binary content to be sent to it in hex format, which ‘it’ converts to binary. On retrieval however, it comes out directly in binary format and not in hex. So when inserting you need to unpack to hex, and when selecting you don’t have to do anything special.

You have to know these things or you’re going to be wasting a lot of precious time trying to figure it all out, if not a work around. I’m pretty sure everyone can eventually figure it out, but it’s about what you already know that sets you apart – not what you are capable of finding out by using Google or the PHP manual!!

Also, consider yourself in a scenario where you need to go over to a client's place and fix an undocumented bug on a local intranet website. Apparently, it's mission critical to have the problem solved on the spot. And to make matters worse (for some at least), you don’t have the PHP manual or access to the internet, but you still need to get the bug solved or you might loose your status as a competent PHP programmer. The management guy who may be sitting right next to you won't necessarily have a clue that some of us need the PHP manual to be able to get any work done!

I'm not saying you need to know the manual inside out. But seriously, having to know the syntax shouldn't be such a big issue. It is such a severe waste of time, if you're going to be referring every single internal PHP function. And if you find yourself using Google every time you’re about to implement a new piece of functionality, then you might benefit from some professional training in PHP.

Basically, stop whining and complaining, just because the test score doesn't agree with your beliefs. It just means you've got at least a little bit of brushing up to do! Learn to enjoy it - it can be fun (if you’re geeky enough ofcourse)!!

I’m off to doing some brushing up myself. I guess nobody’s perfect!

Sat, 11 Feb 2006 at 16:06:54 GMT Link

115.SK Again! said:

Thought some of us might benefit from the type comparisons.


Sat, 11 Feb 2006 at 16:36:36 GMT Link

116.SK said:


Sat, 11 Feb 2006 at 16:38:32 GMT Link

117.Michael said:

I'd just like to comment on #5 in response to someone's question about whether or not there's a point to having it on the test. Personally I think that if nothing else it helps to demonstrate a programmer's debugging ability - we all write code that's missing a semi-colon or a quote and sometimes even an entire command like the return statement - which can be very important to your code after the function call resulting in the correct output.

Hope it helps!

Thu, 16 Feb 2006 at 16:34:25 GMT Link

118.Jose said:

About 6 years of pro PHP development, also versed in other languages (Delphi,VB, etc). I got 3/8.

I agree with the sentiment that those 8 questions do not seem to test my capacity as a PHP developer but focus on insane knowledge of one of the largest manuals for programming. I think that any developer that knows what count() returns when called with anything other than an array needs to be giving explanations, not the other way around.

The question about print_f() is equivalent to asking about the lengthy set of options in the date() function. You do not need to waste your life and brain cells memorizing stuff that is a click away in the manual. I don't even use print_f() for that matter.

I'm planning to take the Zend test only to enhance my CV. I thought it should be an easy ride for real programmers, but now I'm thinking I'm going to have to waste a weekend unnecessarily learning the minors of each function and language construct. You can bet it will all be out of my memory banks before the next weekened.

Mon, 20 Feb 2006 at 01:08:03 GMT Link

119.Dave said:

Great discussion.

I'm looking at the Zend Cert BUT while reading all these comments and only managing a 3/8!!!! I think I'll reconsider.

I too have used PHP to develop everything from Small CMS to shopping carts, probably for the past 2 years.

Who would, in there right mind, try and count a string?

I would trim() and whitespace of strings and substrings, AND I would pre-format most values before pumping them through to HTML... That's just me I guess.

Anyway, when I run through a test I hope to learn something valuable but with this one I only learnt that I wasn't carefull while reading other peoples code... I didn't feel like I could go away and really revise a topic.

I wouldn't say that I'm the greatest PHP programmer but I would also give this test a low score.

Tue, 21 Feb 2006 at 07:03:40 GMT Link

120.Dave said:

One More Point.

I have just completed the sample chapters of the PHP|a book and got 60%.. I thought some of those questions were OK and got me thinking a lot more.

I beleive more generalised questions about overall design and layout are in order.

Syntax is, or at least should be, a given with proper reference.

Don't know how long this link will be valid


Tue, 21 Feb 2006 at 07:36:22 GMT Link

121.Nate Klaiber said:


I felt the same way after taking the practice test. I have been programming PHP for over 4 years now, and sometimes its hard to really go back to the basics. However, don't let that deter you.

I recently purchased the study guide and practice test (link from your past post) and it has helped immensely. It helps you to know the language and WHY certain things happen (Even if you would never really run into the situation).

The biggest part for me is there are sections that I dont use very often - but the test covers all of the basics of PHP. This just caused me to freshen up on what I don't use very often.

I am going to take the test next month and am very excited for it (and nervous). I hope you too make the decision to take the test. What can it hurt?

Tue, 21 Feb 2006 at 14:09:32 GMT Link

122.Anh N. said:

I wanted to get the certification, but I guess I'll wait on it a bit until the price drop or if I have a lot of spare cash and time.

This sample exam is ok, half of it isn't realistic or really worthy. But half are good questions. Question 3,4,5, and 7 and applicable in real life and does test your knowledge of programming structure and how you think.

3, 4, and 5 are essential logic test. If you got formal training in Comp Sci, these are the kind of brain teasers that come up in tests. CS doesn't teach you syntax as much as "How to Think."

7 is a great question because it test symantics and a programmer's knowledge of the language's current development. Register Global issue come up a lot in server admin circles.

I hope they have more logic and real life type questions though. The other 4 that I didn't list aren't applicable to evaluating someone's skill, and as other have said, good programmers will know when to get out the references.

I think I will try to get this certificate during the summer. What can I say, I like shiny certificates with my name on them. :)

Mon, 27 Feb 2006 at 01:00:18 GMT Link

123.Vlasis said:

I have never composed PHP code in my life. i just happen to know the logical of programming and got a 5/8 answers correct. i believe that the test is not very representative of whether someone can take the exam or not... I just started reading Programming in PHP and i don't believe i can take the exam. Or maybe i am that good!?

Sat, 04 Mar 2006 at 19:35:35 GMT Link

124.Jenny said:

hmmm, just wodering why on this site half of the comments appear empty.

as for the exam, questions 3 and 4 are absolutely useless, as no one uses this syntax anymore. While it helps to know the old way, it in no shape of form determines your ability to code in php4 or php5.

Just like shakespearian english, it is nice to know but no one uses it.

wonder if my comments will actually show up?

Tue, 07 Mar 2006 at 09:16:30 GMT Link

125.Amjad A. said:

Question 3


$text = 'Content-Type: text/xml';

Which of the following prints 'text/xml'?

A. print substr($text, strchr($text, ':'));

B. print substr($text, strchr($text, ':') + 1);

C. print substr($text, strpos($text, ':') + 1);

D. print substr($text, strpos($text, ':') + 2);

E. print substr($text, 0, strchr($text, ':'));

The answer is D. The string position of : (the colon) is two less than the string position of the t, so strpos($text, ':') + 2 provides the string position of the t. The substr() syntax therefore says that we want the substring of $text that begins with the t and continues to the end of the string.

if you run the given code then C. and D. giving the same output i.e, 'text/xml'. plz check this out, but you are saying that answer would be D. how is that?

Tue, 07 Mar 2006 at 14:36:10 GMT Link

126.Nate Klaiber said:

RE: Amjad

The answer IS D, and it is the perfect example. C would return ' text/xml' (with a leading space). The question is asking for specifically 'text/xml' - no leading or trailing spaces.

So, while they would both HAVE the text in the result, D would be the best solution or answer given.

This seems to be explained in the question details, but there could be something I am missing. I am sure Chris could clarify.



Tue, 07 Mar 2006 at 15:23:05 GMT Link

127.Abhijit said:

hi there...i jus gave the sample test...and for the 3rd question...the options C and D give the same correct output...what is the difference between the two statements...




Sat, 11 Mar 2006 at 11:14:56 GMT Link

128.Doug said:

If anything, this test is a good demonstration of things wrong with PHP. 0123 means octal, that is just plain nuts.

count() isn't polymorphic, like len() in python.

Most of the questions are examples of bad programming. I guess if that's what we need to learn, whatever.

Thu, 16 Mar 2006 at 13:30:03 GMT Link

129.FokeyJoe said:

2/8 and I've been pro for 4 years. It didn't help that I've never used count, because there's an alternative, sizeof, that I use. Even having been a low-level systems engineer, I've never needed to use octal, and I still can't really think of a reason to do this, I'm happier with hex/dec/bin. The content-type question can be misleading from the POV that if it were a real header from a real HTTP message, it doesn't have to have a space after the colon, so you could've missed the first letter of the string you were after. Better to do the strpos+1 and trim the result, as the spec claims you MAY do! And I thought nothing came out of a function that returned nothing because most non-zend IDE people on the planet would do print $result, not var_dump to find out what it was returning. The point should've been that you spotted the lack of a return so causing the problem.

But actually, I'm not complaining that bitterly, you do need to have knowledge of a topic for an exam - that's the reason for taking it! And as some of the blurb said, the exam emphasis is on being able to read the code and determine behaviour - a skill that's needed when induhviduals have been doing the coding!

Sat, 18 Mar 2006 at 11:02:11 GMT Link

130.Robin Vickery said:

Doug wrote:

If anything, this test is a good demonstration of things wrong with PHP. 0123 means octal, that is just plain nuts.

Why? it's not exactly a new convention.

$ python -c 'print 0123;' # 83

$ php -r 'print 0123;' # 83

$ perl -e 'print 0123;' # 83

$ pike -e 'write((string) 0123);' # 83

$ echo $((0123)) # 83 (bash)

I got 5. wrong: I've been using perl a lot recently, in which the answer would be 4.

I got 6. wrong: I'm an idiot.


Mon, 20 Mar 2006 at 12:31:18 GMT Link

131.Robin Vickery said:

I wrote:

$ echo $((0123)) # 83 (bash)

Just for consistency's sake, can I amend that to:

$ posh -c 'echo $((0123))' # 83


Mon, 20 Mar 2006 at 13:03:47 GMT Link

132.Randell Benavidez said:

I've had several projects using PHP and was surprised by the questions. And the result. Only got 4/8.

Still, certifications are certifications. Exams are exams. If all PHP programmers will commit the same mistakes, how can you say that you are better?

It's when you commit mistakes less.

I'd like to take the certification. I wish someone would sponsor for the voucher and study guides.

--- chai356@yahoo.com ---

Sat, 01 Apr 2006 at 12:31:39 GMT Link

133.Gonzola said:

I think this test is really good. If you know how PHP's typecasting works you may prevent many errors in your code!

And yes: this test is very syntax-based - but this is the spirit of PHP! You cannot test _all_ surrounding things but all syntax ;-)

7/8 ... I never tried to echo something in class body^^


Wed, 05 Apr 2006 at 08:48:35 GMT Link

134.Wayne said:

Nice work with the sample questions.

It's amazing to me that so many negative emotions and 'sour grapes' have been applied against testing syntax knowledge. Of course no one memorizes every function, but things like sprintf() are pretty basic (and the questions weren't that tough).

It is fascinating that almost no one who complained about how invalid the questions were offered suggestions on what 'good' questions should look like.

Certification doesn't by itself 'prove' that a person is qualified. There are plenty of folks with various certifications who aren't competent. And the same type of arguments berating these few sample questions could easily be applied against nearly any certification test.

One of the benefits associated with any certification is being required to become familiar with a broad variety of content. To be fair, it would be impractical to map an exam to one person's 'real world' situation. Many - if not most - developers tend to operate within a fairly small subset of a given language.

Thanks for taking time to put this little test together. I've taken hundreds of practice tests (along with about a dozen certification exams). By relative comparison, this one was in the top 10% (IMHO).

Wed, 05 Apr 2006 at 23:30:52 GMT Link

135.Sharon Levy said:

Question #1 - My Comment:

What's wrong with this question?

a) count() practically speaking is used to determine how many elements are in an array. Why would someone even want to use count() on a string?

If you need to know the length of a string, the answer is of course to use


The question should be re-written as either how do you determine how many elements are in an array

or alternatively how do you determine how many characters are in a string.

b) <? ?> is not the recommended way of doing things anymore although it

can be done. Better to write instead <?php ?>

c) Although not necessary in this case, it would be good form to include the semi-colon

at the end of the count statement as follows:

<? echo count ("123"); ?>

Mon, 24 Apr 2006 at 21:21:52 GMT Link

136.Sharon Levy said:

QUESTION #2 - comment:

This is an example of what I call misleading.

Had the question been written as "which statement produces the result 42.00, would have been

a more clear way of doing things. And, practically speaking programmers writing financial reports

are frequently looking at decimal numbers and trying to figure out how best to display them with code.

This question is about as challenging as a doorknob. All you do is go to php.net and look up sprintf if

one doesn't grasp the details of the format string.

Choices B) and C) share something that doesn't make sense. Why would you use the optional width parameter of 1?

Seems to me if you were going to write code, you'd either leave it out entirely or specifiy an optional width parameter of 5,

(ie 2 charaters for "42",plus 1 for the period and 2 for decimal places -- hence 5). If I wrote a 1 and my code was peer-reviewed

I am sure someone would ask, what on Earth I was thinking.

Mon, 24 Apr 2006 at 21:24:48 GMT Link

137.Sharon Levy said:

QUESTION #3 - my comment:

Better question is how would you print only 'text/xml'? Someone would have to realize that in order to extract that portion from the string $text, one would have to use substr(). Again not a terribly challenging question. Just go to php.net if you're unaware of the required and optional params.

Mon, 24 Apr 2006 at 21:26:42 GMT Link

138.Sharon Levy said:

QUESTION #4 - comment

What's wrong here? First of all most programmers use parentheses to be abundantly careful and clear as to what should happen first. Who is going to rely on memory alone regarding operator precedence. And to make it easy for somone else to read the code parentheses should also be used. Not doing so is bad form.

So, the question should be rewritten as:

$a = (123 == 0123);

Mon, 24 Apr 2006 at 21:28:54 GMT Link

139.Sharon Levy said:

QUESTION #5 - comment:

Another "tricky" question. Should be reworded as "Review this code and indicate if this code is okay or if it has an error what is it?"

This btw is what I'd call a Brainbench type question. Nothing to indicate one's ability to conceive an application and program it.

Mon, 24 Apr 2006 at 21:30:51 GMT Link

140.Sharon Levy said:

QUESTION #6 - comment:

I'd change this to "Please write an example of a class definition."

Mon, 24 Apr 2006 at 21:31:51 GMT Link

141.Sharon Levy said:

QUESTION #7 - comment:

This is a poor and confusing question. It would be better to write a question asking whether PHP4/5 have register_globals off/on

and why.

Mon, 24 Apr 2006 at 21:32:56 GMT Link

142.Sharon Levy said:

QUESTION #8 - comment:

This is basically the same as question #1 above and again same criticism as above.

In fact, since question eight is really just another question #1, one has to wonder why it was

even included, tip the scales against/for the test-taker or for Zend? ;-)

Mon, 24 Apr 2006 at 21:34:39 GMT Link

143.Mike Willbanks said:


You have to understand, the test is not only about good style. In the real world of programming you do not normally encounter software with much good style in corporations.

Criticism is good in context but for the exam they need to test both aspects. If they do not how can someone come into a situation where "x" consumer had badly written code and "y" developer needs to rewrite it and figure out the details of what the system does.

If they have only seen clean cut clear code, they most likely will not be able to do it. Also in intranet projects where everything is internal there is a little bit of a different development cycle and sometimes non-standard ways are utilized.

Just to quickly comment on this line:

"This is a poor and confusing question. It would be better to write a question asking whether PHP4/5 have register_globals off/on

and why."

By default in ALL the recommended ini files from the offical packages at php.net have register_globals off. So that question would not fit because they are inaccurate.

Mon, 24 Apr 2006 at 22:34:46 GMT Link

144.Phillip said:

1 out of 8. If I hadn't wild-guessed count(), I would've gotten two out of 8. I'm currently developing a custom CRM Application in PHP and have been programming the last 20 years. My favourites are Python and ActionScript but I'd say I'm quite good in PHP aswell. Hehe.

Bottom Line is you have to be prepared to be asked mean questions, that is questions that are designed to fool you. Like the one with the missing return. Mean sucker that was. This selftest has more of a riddle than an actual exam.

Does anyone know if this reflects the actual style of the certification? If so, one would know what to prepare for. If I should do this exam-thing, I'm gonna have to do some guinee-pig training in the brainless multiple-choice-test departement. Definitely.

Tue, 02 May 2006 at 07:47:38 GMT Link

145.Phillip said:

Did the test again. 8/8. Had to look carefully to use 'inject' instead of the impercise 'enhance'. Found out that 'show_errors' doesn't exist by checking the manuals :-) . Memorized all the loopholes from the first failure and double checked for deliberate missleadings.

I recommend all experienced programmers who botched the first run to do a second one after reading the explainations without pondering the 'failure' to much. Not to fool youself, but to get a feeling of the 'riddle and trickery' style of the test and probably what to look out for when doing the exam. Especially anyone from a country where multiple-choice questions are not the usual style of testing.

Tue, 02 May 2006 at 08:19:37 GMT Link

146.Nate Klaiber said:


I recently passed the ZCE test, and I will say that it was somewhat tricky. If you just started programming, I dont see it possible that you could pass this without some intense studying. The practice test here, along with the study guide and practice test book helped me prepare for the exam. It gives you a great feel of what you will see with the actual test, only the actual test is less error-filled.



Tue, 02 May 2006 at 19:28:26 GMT Link

147.Bryan said:

Well I gave my first shot at this self test: 2/8.

I did learn a couple of things though, so it was worth doing the test.

That $a = 123 == 0123 question really confused me.

I never knew about the leading zero means octal, and definitely never seen that sort of boolean assignment before now; although after staring at it for a while it suddenly made sense.

The count( ) questions of course really confused me too.

I didn't know what the hell it would do and I ended up coming to the wrong conclusion.

But I learned something, and that's what is most important.

Thu, 18 May 2006 at 03:29:17 GMT Link

148.Vivian said:

I have been programming using PHP since PHP3 and now do enterpise projects using PHP 5. I got 2 out 8. If this is how the certification exam is structured then a PHP cert will just be seen as the Msoft ones where people just stack up on syntax and rarely used parts of the language to pass.

Sat, 03 Jun 2006 at 20:06:28 GMT Link

149.Matthias Esken said:

Well I just did this test and I got 7 out of 8. I failed on question 3 'cause I just did not want to think about the parameters. :-)

I still wonder if I need lot of this during my work. There were some pieces of code I'd never use.

Tue, 06 Jun 2006 at 07:17:55 GMT Link

150.bansidhar said:

Wow I think I have managed to get less than half mark per year of PHP programming experience got 3 marks :), I am working with PHP for last 8 years and all my clients told me, I produce very high quality code.

If this is the method Zend is certifying people I will never recommend anyone with a certification. The test dosen't cover the capibility of a person to solve a situation. This is just a syntax test, and I don't have to appoint a person to refer the syntax, can always look up it in the manual and even some editors come with a syntax lookup builtin.


Sun, 18 Jun 2006 at 16:37:28 GMT Link

151.t black said:

the first question has no semi colon so it would actually give you a parse error.

Tue, 20 Jun 2006 at 12:36:45 GMT Link

152.chirayu bhatt said:

Only 6/8.

It should give candidates answer to compare with.

Mon, 26 Jun 2006 at 14:24:43 GMT Link

153.heynow said:

t black are your sure???

as long as it is the last line it does not need the semi colon


Sat, 01 Jul 2006 at 02:19:28 GMT Link

154.Some Guy said:

First, I'm new at this. Having worked with PHP for about...4 weeks, I only got one right :( #5, in case you're wondering; I may not know how PHP treats numbers with leading zeroes, but even I know that a function better have a return statement if you want to get anything out of it...)

Anyway--my view of the questions (e.g. the much-maligned #6) is of little interest to anyone. I did, however, have a question about #7.

"The answer is D." "(When turned on, [register_globals] will [inject] your script with different variables from HTML forms and cookies.")

"...I'm not sure that a distaste of register_globals is a necessary characteristic of an expert PHP developer."

So the test writer doesn't think that a distaste of register_globals is appropriate for an expert PHP developer, but that is the correct answer?

As I said--I'm completely new at this, so ignore me as you will. :-)

Mon, 03 Jul 2006 at 09:23:59 GMT Link

155.Grim said:

One would wonder, seeing the amount of talent that has failed this test, if it was not specifically designed to try to sell study guides.  Poor attempt since my own immediate reaction to each question as I took the test was the same as what was commented on here.  My guess would be that those that passed the test either have an incredible memory and have stored the PHP manual or did a little research while taking the test.

Really, if I was to hire someone to do PHP for me I could care less wether they memorized the syntax for printf, but they better be able to find the answer very quickly.  I'd be more concerned that I get an intellegent answer when I asked them about security or using frameworks and MVC in PHP .  

Tue, 11 Jul 2006 at 15:19:48 GMT Link

156.Peter Brodersen said:

Nice test. #4 could be expanded to include 123 as an (invalid) option - just to make sure that the user understands operator precedence.

Tue, 11 Jul 2006 at 18:14:57 GMT Link

157.Tom said:

I'd have to agree with the majority of what everyone says here.

Testing the memory of syntax is probably the worst way to tell if someone can code PHP. I've been programming PHP since 2001 and have yet to remember the syntax of a lot of functions. I've never used count outside of an array. I noticed your explanation of why its hard is because of that exact reason. However, I would think that reason would be enough to tell you that you really shouldn't use count on anything that isn't an array. The PHP manual is my right hand man and I use it often when I forget simple things like whether the function uses "haystack, needle", or "needle, haystack", but I think that's mostly because some functions use haystack, needle, and others the other way...

Once I get some money, I might take the certification exam, but if its like this, I will definately be dissatisfied if it is like this example. That would lower your 100% satisfaction, but you probably only include those who have passed it. This sample might also explain why only about 1000 people are certified PHP engineers.

Sat, 29 Jul 2006 at 21:35:51 GMT Link

158.Ronald Roush said:

I agree with Grim. I've been programming in PHP for about 5 years and I flunked this test. I use the Zend IDE so some of the test scenario constructions would have been autocompleted or flagged if incorrect, or the code anaylzer would have advised me. So why do I need to memorize them? If you remove the syntax memorization from testing it sorta leaves the logic of programming. So is the certification about being a good programmer or being good at a specific language's syntax and idiosyncrasies?

Perhaps Zend should test people that write a fifty or a hundred thousand of lines of PHP a year (like I do) and if they fail the test then perhaps the testing methods need adjusting.

Tue, 15 Aug 2006 at 19:42:59 GMT Link

159.biju said:

i am going to write zend certification exam

Wed, 16 Aug 2006 at 09:55:52 GMT Link

160.robert robles said:

Am new with php and got 3/8.

Just for an opinion, even though we program for years with any language that boost our ego and gain self-respect (bout the tools we are accustomed to) for me certification is an eye opener that if you'll get the "certified" attached to your credentials, i believe we should have a level of mastery of the tools we are using.

Mastery gives a lot of meaning and falls onto the context of individual preferences. Now, if we'll going to have this certification which mastery of preferences are we talking bout? our experience or the standardization of a common knowlege. i.e. php.

I like the self test, it mutates our reasoning how to prepare for it. And we should be proud of it. I believe this brings us into another level of respect from other tools competing with the power of php.

If we'll be certified, we should work hard enough for it and get the desired rewards? from doing it.

Anyway, anyone wanting to have it have utter intentions.. in any case..what is the intention?

Fri, 18 Aug 2006 at 08:07:56 GMT Link

161.Princevel said:

I just scored 4/8. This was my first test on PHP

And i am preety happy to score 50%.

Hope to get more marks in next tests.

thank you

Sat, 26 Aug 2006 at 12:45:42 GMT Link

162.Muhammad Fareed said:

Hi i have score 7/8.

i have attempt q7 wrong.its good/and bad both.

Thu, 31 Aug 2006 at 11:29:40 GMT Link

163.Brad said:

One year of PHP development, self taught, and scored 5 out of 8. Of course, I don't fault the test for the questions I missed. Some people seem to believe that this test is supposed to distinguish them as a great programmer - it is a PHP certification test! It is meant to distinguish those who have a thorough knowlege of the PHP language and syntax from those who don't. It's not supposed to be an all-in-one solution for those wishing to present themselves as a strong web programmer. I currently hold several certifications including A+, Network+, MCP WinXP, MCP WinServer 2003. None of these tests were by themselves a complete solution to demonstrate my knowlege in my field.

Let's be honest, with the proper documentation and web resources, one could be an engineer in nearly any computer related field - just need time to look up the correct answer. Judge this test for what it is - not for what you wish it was.

Mon, 11 Sep 2006 at 14:50:08 GMT Link

164.Royce said:

This certification examine is becoming:



#6 needs to be reworded correctly. In fact, I think the whole idea of fill-in the blank is a bad idea. This whole question format should be scraped. Also do ambiguous!



#7 I have the biggest problem with, because its ambiguous because it relies on the programmers impression of register_global, not any technical knowledge. Unless there was another global that did indeed "enhance" the script.


Tue, 26 Sep 2006 at 21:14:51 GMT Link

165.Julian Egelstaff said:

I think Zend is doing themselves a huge disservice with this self test. I wrote and passed the PHP 4 certification exam a couple weeks ago, and I don't recall a single question like the silly "count" questions in this self test.

There were a couple syntax related questions, but on the whole I thought the test was actually pretty good and did require an understanding of how PHP works and how to use the language properly.

It did not test overall design ability, I don't think a multiple choice certification exam ever could, but I think it was a fair test of overall PHP knowledge. There were a fair number of questions that actually required reading code and understanding what it was doing and where errors were or what outputs would be.


Wed, 27 Sep 2006 at 19:28:34 GMT Link

166.WeeWee said:

If this is what the certification is all about then its significance is vastly overestimated. Iit relies on old-fashioned ways of testing capabilities and as for the "can the class defiinition span multiple blocks" it is totally idiotic. Why on earth would anybody need to know something that is as a very thought something totally weird.

The "count" questions are beyond belief and most other questions refer to something one can easily check from the manual. Being able to design, create good structure and solve problems is NOT LEARNING FUNCTION DEFINITIONS BY HEART.

I am a professional developer and at the same time a qualfied professional teacher. This mockery of a test was such a flop of that I will not even think about going to the real one.

Thu, 28 Sep 2006 at 11:13:29 GMT Link

167.Dan said:

Just like to say the logic of this test seemed upside down to me.

We would not write code if we already knew all of the results of the output or didnt need the output... so how about testing coders with more logical questions - ones that actually need answers instead? At least there is a problem to solve - an objective to complete - not just some abstract worthless and usless peice of make believe code!

I agree mith most of the comments about question 7... it has nothing to do with php - it is an english test to see if you should use "inject" or "enhance".

Tue, 03 Oct 2006 at 12:26:32 GMT Link

168.Andy Baptiste said:

All in all I think these type of mock tests do serve a purpose in that they get you thinking in a 'test taking way'.

Test setters nearly always put the odd question in that is subjective, confusing, or that seems irrelevant.

I took Suns Java Certification a couple of years ago and found some of the questions more confusing than the answers, if you know what I mean. ;o)


Fri, 06 Oct 2006 at 16:34:10 GMT Link

169.anon. said:

I fail to see much reason behind the questions involving count().

Such questions are orrientated around unsuitable, or atleast unclear use of count() in the first place.

I would have expected passing a scalar value to raise an error rather than return (int) 1, perhaps even treat the string as a byte array and return the number of elements.... but not the defined behavior.

To quote ___ online dictionary:

Ambiguity: an expression whose meaning cannot be determined from its context.

I such use of count() is ambiguous... and I wouldn't expect to find it in any professional script. Does the test assume a background in sloppy coding?

Tue, 10 Oct 2006 at 00:45:48 GMT Link

170.tan said:

2 of 8. Hmmm, I've been programming in PHP for about 5 years... and never need to count() a string... and my web or app works well... so I think... php documentation gives me a better value than the exam...

Tue, 10 Oct 2006 at 08:48:18 GMT Link

171.tan said:

but i agree with Brad, Judge this test for what it is - not for what I wish it was.

Tue, 10 Oct 2006 at 09:08:51 GMT Link

172.Ralph said:

On November 15th of 2006, I took the Brainbench Java 2 test.

When I went into the test, I was expecting something that would test my general knowledge of the Java language and object oriented programming. The test that I took did not do that.

There were a large number of questions on special purpose API's that I have never used. There were some

questions on development tools that I have never used. And there were a large number of "brain teaser"

questions on code snippets which I could have answered, if I would have had more time.

As a result, my test score was very low (2.60).

That score shows that I'm not good at guessing at API's and tools that I've never used. And it shows that I'm not

good at brain teasers with a three-minute time limit. However, it shows ABSOLUTELY NOTHING about my Java

and object oriented programming skills.

In 2002, I studied a book on Java, and then I took a college course on it. I got an A in the course. According to my Brainbench score, I should not have been an "A" student.

For over a year, I was the sole designer and developer of web software that my employer believes is marketable.

That software involves thousands of lines of Java code, a large number of API's, and a large number of advanced

object oriented constructs. According to my Brainbench score, I should not be able to accomplish what I have just


When I was in college, I took secondary education courses. Later, while I was working for a former employer, I designed two computer courses which I taught for several years. As a trained and experienced trainer and tester, it is my opinion that the Brainbench Java 2 test has a number of very serious flaws.

It appears that there have been no sound scientific studies regarding the Brainbench claim that their tests predict employee success. And it appears that there are a large number of companies that are blindly accepting these unsubstantiated claims.

It seems to me that a sound scientific study for the Java 2 test would include the following elements: have

thousands of working and successful Java programmers take various Java 2 tests; have thousands of

inexperienced people with Java knowledge take the same tests; for individual test takers, have tests with a large

number of questions on API's and tools that they have never used; for individual test takers, have tests with a

large number of questions on API's and tools that they have used; for the latter, follow their careers as Java

programmers for at least five years.

It appears to me that the creators of the Brainbench Java 2 test do not know what a typical Java programmer

does, and they have no understanding of the art of testing.

I wonder how many careers have been derailed as a result of flawed Brainbench tests. I would like to see a

scientific survey on that.

Wed, 22 Nov 2006 at 01:13:32 GMT Link

173.Abhijit said:

Thank you very much Sir. I got all of the above questions right. I'm preparing for ZCE since past 5 months , and am now looking forward to give the same next week. Let's hope for the Best.

Sun, 24 May 2009 at 03:27:04 GMT Link

174.felicia said:

Thanks for posting this self-exam. I just passed the exam (yay!) and reading this post helped me a lot, reminding me not to take anything for granted. There were so many syntax questions! I felt like a human debugger...

I think this exam would be more useful to freelancers who go into a project for a short time and might have to do a lot of debugging. For an in-house person like me, it's not quite as useful, but I'd put a lot of effort into studying, so it's a relief to pass. :)

Sat, 27 Mar 2010 at 00:24:54 GMT Link

175.Shayan Ahmed Malik said:


i just want to refer/reply two comments here (plz never mind if they have already got a reply).

tepp (comment # 14):

yes, you should try to make a wild guess in questions where you are not certain as zend will never deduct any marks for ur wrong answers (i.e. there will be NO negative marking).

Ghiraj Patra (comment # 31): the correct answer for Q#5 is indeed a "null" (not "nothing")..as according to the PHP manual, if the return() is omitted the value NULL will be returned.

ref: http://php.net/manual/en/functions.returning-values.php

b.t.w, nice work Chris..

Sun, 22 May 2011 at 14:18:12 GMT Link

Hello! What’s your name?

Want to comment? Please connect with Twitter to join the discussion.