Zend exam questions need help

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Locked
User avatar
getmizanur
Forum Commoner
Posts: 71
Joined: Sun Sep 06, 2009 12:28 pm

Zend exam questions need help

Post by getmizanur »

I am trying to go through some Zend questions and since I do not have anyone to check them with so I've thought to post them here. Can someone tell if they are right or wrong. Many thanks in advance

1. The following code can be better represented as what?
<?php
if($a == 10) {

} elseif ($a == 20) {

} elseif ($a == 30) {

}
?>
Answer:
a) A switch statement without break statements
b) A foreach statement
c) A while statement
d) A swtich statement
e) A multiple if statement

My Ans: (e)

2. The _________ keyword is used to indicate an incomplete class or method, which must be further extended and/or implemented in order to be used

Answer:
a) final
b) protected
c) incomplete
d) abstract
e) implements

My Ans: (d)

3. The _________ method in PDOStatement class is used to return the next result set in multi-query statement.

My Ans: (fetch)

4. What is the output of this code

<?php
$array = array(0.001 => 'b', .1 => 'c')

print_r($array)
?>

Answer:
a) An empty array
b) 0.001 => 'b', .1 => 'c'
c) 0 => 'c'
d) '0.001' => 'b', '0.1' => 'c'
e) A syntax error

My Ans: ( C )

5. Name three new extensions in PHP5

Answer: (choose 3)
a) tidy
b) soap
c) java
d) curl
e) mysqli

My Ans: (a, b, e)

6. What is the output of the following script

<?php

$a = 1;
$b = 2.5;
$c = 0xFF;

$d = $b + $c; 255 + 2.5 = 257.5
$e = $d * $b; 257.5 * 2.5 = 643.75
$f = ($d + $e) % $a;

print ($f + $e)

?>

Answer:
a) 643.75
b) 432
c) 643
d) 257
e) 432.75

My Ans: (a)

7. Type-hinting and the instanceof keyword can be used to check what types of things about variables?

Answers (choose 3)
a) If a particular child class extends from it
b) If they are an instance of a particular interface
c) If they are an abstract class
d) If they have a particular parent class
e) If they are instance of a particular class

My Ans: (e, d, a)

8. One can determine if it is possible to send HTTP headers from within your PHP script using which of the following functions?

Answer
a) apache_headers_enabled()
b) is_headers_enabled()
c) is_headers_sent()
d) headers_sent()
e) headers_enabled()

My Ans: (d)

9. When embedding PHP into XML documents, what must you ensure is true in order for things to function properly?

Answer:
a) Disabling of the short_tags in PHP.ini directives
b) Enabling the asp_tags PHP.ini directives
c) That you have Xpath support enabled in PHP5
d) That your XML documents are well-formed
e) None of the above, PHP can be embedded in XML in all cases

My Ans: (e)

10. The following is common XML structure used in service oriented architectures, what does it represent?

<?xml version=”1.0”>
<methodCall>
<methodName>myMethod</methodName>
<params>
<param>
<value><string>HI!</string></value>
</param>
</params>
</methodCall>

Answer
a) None of the above
b) A fragment of a complete SOAP request
c) XML-RPC
d) REST
e) SOAP

My Ans: (e)

... continued
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Zend exam questions need help

Post by Eran »

You have mistakes on 7 of the 10 questions. Most of those can be checked simply by running code or consulting the manual, so I suggest you do that.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Zend exam questions need help

Post by Benjamin »

:arrow: Locking this before someone provides the answers.
Locked