Labour Day Special - 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: c4sdisc65

200-500 PDF

$38.5

$109.99

3 Months Free Update

  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions

200-500 PDF + Testing Engine

$61.6

$175.99

3 Months Free Update

  • Exam Name: Zend PHP 5 Certification
  • Last Update: May 4, 2024
  • Questions and Answers: 219
  • Free Real Questions Demo
  • Recommended by Industry Experts
  • Best Economical Package
  • Immediate Access

200-500 Engine

$46.2

$131.99

3 Months Free Update

  • Best Testing Engine
  • One Click installation
  • Recommended by Teachers
  • Easy to use
  • 3 Modes of Learning
  • State of Art Technology
  • 100% Real Questions included

200-500 Practice Exam Questions with Answers Zend PHP 5 Certification

Question # 6

What SimpleXML function is used to parse a file?

A.

simplexml_load_file()

B.

simplexml_load_string()

C.

load()

D.

loadFile()

E.

loadXML()

F.

None of the above.

Full Access
Question # 7

Which of the following may be used in conjunction with CASE inside a SWITCH statement?

A.

A scalar

B.

An expression

C.

A boolean

D.

All of the above

Full Access
Question # 8

Given the following array:

$a = array(28, 15, 77, 43);

Which function will remove the value 28 from $a?

A.

array_shift()

B.

array_pop()

C.

array_pull()

D.

array_unshift()

Full Access
Question # 9

Which of the following commands will append data to an existing file?

A.

file_put_contents("file", "data", "a");

B.

file_put_contents("file", "a", "data");

C.

file_put_contents("file", "data", FILE_APPEND);

D.

file_put_contents("file", "a", NULL, FILE_APPEND);

Full Access
Question # 10

What is the output of the following code?

1

2 for ($i = 0; $i < 1.02; $i += 0.17) {

3 $a[$i] = $i;

4 }

5 echo count($a);

6 ?>

A.

0

B.

1

C.

2

D.

6

E.

7

Full Access
Question # 11

Which of the following did not result in an output error in PHP 4 but does in PHP 5?

A.

Using 'var' as an access modifier.

B.

Assigning a new object instance to $this in a constructor.

C.

Passing an object by-reference.

D.

Passing an object by-value.

Full Access
Question # 12

You want to parse a URL into its single parts. Which function do you choose?

A.

parse_url()

B.

url_parse()

C.

get_url_parts()

D.

geturlparts()

Full Access
Question # 13

What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?

A.

get_headers($url);

B.

get_header($url);

C.

stream_context_get_headers($url);

D.

get_headers($url, 1);

E.

get_headers($url, ASSOC_HEADERS);

Full Access
Question # 14

How can you determine if magic_quotes_gpc is enabled? (Choose 2)

A.

Use the get_magic_quotes() function.

B.

Using the get_magic_quotes_runtime() function.

C.

Use the get_magic_quotes_gpc() function.

D.

Using ini_get('magic_quotes_gpc').

E.

Using ini_get('magic_quotes').

Full Access
Question # 15

You want to present the following formatted number: "999.000.000,00". Which function call is correct?

A.

print format_number(999000000);

B.

print number_format(999000000);

C.

print number_format(999000000, 2, ',', '.');

D.

print number_format(999000000, 2);

E.

print_number(999000000, 2, ',', '.')

Full Access
Question # 16

Which of the following is NOT a valid function declaration?

A.

function x ($x1 = array())

B.

function x (A $x1)

C.

function x (A $x1 = null)

D.

function x ($x1 = $x2)

Full Access
Question # 17

How many times will the function counter() be executed in the following code?

function counter($start, &$stop)

{

if ($stop > $start)

{

return;

} counter($start--, ++$stop);

}

$start = 5;

$stop = 2;

counter($start, $stop);

A.

3

B.

4

C.

5

D.

6

Full Access
Question # 18

Transactions can be used to: (Choose 2)

A.

Recover from errors in case of a power outage or a failure in the SQL connection

B.

Ensure that the data is properly formatted

C.

Ensure that either all statements are performed properly, or that none of them are.

D.

Recover from user errors

Full Access
Question # 19

Which of the following can be registered as entry points with a SoapServer instance (choose 3)

A.

A single function

B.

A single method from a class

C.

Multiple functions at once

D.

All methods from a class

E.

All classes defined in a script

Full Access
Question # 20

Which of the listed changes would you make to the following PHP 4 code in order to make it most compliant with PHP 5? (Choose 2)

class Car {

var $model;

function Car($model) {

$this->model = $model;

} function toString() {

return "I drive a $this->model.";

}}

$c = new Car('Dodge');

echo $c->toString();

?>

A.

Change var to public or private

B.

Change function Car to function_construct

C.

Change "I drive a $this->model." to "I drive a {$this->model}."

D.

Change function toString()to static function toString()

Full Access
Question # 21

Given the following code, what is correct?

function f(stdClass &$x = NULL) { $x = 42;

}

$z = new stdClass;

f($z);

var_dump($z);

A.

Error: Typehints cannot be NULL

B.

Error: Typehints cannot be references

C.

Result is NULL

D.

Result is object of type stdClass

E.

Result is 42

Full Access
Question # 22

Which of the following data types cannot be directly manipulated by the client?

A.

Cookie Data

B.

Session Data

C.

Remote IP Address

D.

User Agent

Full Access
Question # 23

What is the content of $c after the following code has executed?

$a = 2;

$b = 3;

$c = ($a++ * ++$b);

A.

0

B.

5

C.

8

D.

4

Full Access
Question # 24

Which options do you have in PHP to set the expiry date of a session?

A.

Set the session.duration directive in php.ini

B.

Set session cookie expiry date locally via session_set_cookie_params()

C.

Set session expiry date locally via session_cache_expire()

D.

None of the above

Full Access
Question # 25

What will the following function call return?

strstr('http://example.com/test/file.php ', '/');

A.

/example.com/

B.

/file.php

C.

file.php

D.

//example.com/test/file.php

Full Access
Question # 26

How many array elements will be found in the return value of:

split(".", "

A.

B.C")

B.

2

C.

3

D.

1

E.

6

F.

4

Full Access
Question # 27

You analyze the code of a colleague and see a call to the function quotemeta(). You give the string "Holy $%&[. What's going on?" as a parameter to it. What will it output?

A.

Holy $%&[. What's going on?

B.

Holy \$%&\[\. What's going on\?

C.

Holy $%&[. What\'s going on?

D.

Holy \$\%\&\[\. What\'s going on\?

Full Access
Question # 28

Which elements does the array returned by the function pathinfo() contain?

A.

root, dir, file

B.

dirname, filename, fileextension

C.

dirname, basename, extensio

D.

path, file

Full Access
Question # 29

In the function setcookie() what does the 3rd parameter specify?

A.

The name of the cookie.

B.

The expiration time of the cookie.

C.

The value of the cookie.

D.

The IP address of the cookie's client.

Full Access
Question # 30

Do constants have global scope or local scope?

A.

They have global scope

B.

They have local scope

C.

They have both global and local scope

D.

They have neither global nor local scope

Full Access
Question # 31

You are creating an application that repeatedly connects to a database to retrieve order data for invoices. All data comes from the same database. In order to preserve resources, you have to ensure that only one database connection should be used at any time. The code also has to open as few new database connections as possible. Which design pattern should you use for this scenario?

A.

Adapter

B.

Factory

C.

MVC

D.

Singleton

Full Access
Question # 32

Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)

A.

XML-RPC

B.

SOAP

C.

WSDL

D.

UDDI

Full Access