Spring Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

200-530 Zend PHP 5.3 Certification Questions and Answers

Questions 4

How to read a single line, no matter how long from an file opened in the example below?

$fp = fopen( " my_file.txt " , " w " );

Options:

A.

fgets($fp);

B.

fgets($fp, -1);

C.

fread($fp, 1024);

D.

fgetss($fp);

E.

None of the above

Buy Now
Questions 5

What function returns the filename component of the file ' s path:

Options:

A.

dirname()

realpath()

B.

basename()

C.

pathinfo()

D.

parse_url()

Buy Now
Questions 6

Some databases support the LIMIT clause. ft is a method to ensure that

Options:

A.

only certain rows are deleted in DELETE queries.

B.

only a defined subset of rows are read in SELECT queries.

C.

only certain users can access the database.

Buy Now
Questions 7

What object method specifies post-serialization behavior for an object?

Options:

A.

__sleep()

B.

__wakeup()

C.

__set_state()

D.

__get()

E.

__autoload()

Buy Now
Questions 8

Which of the following function signatures is correct if you want to have classes automatically loaded?

Options:

A.

function autoload($class_name)

B.

function __autoload($class_name, $file)

C.

function __autoload($class_name)

D.

function _autoload($class_name)

E.

function autoload($class_name, $file)

Buy Now
Questions 9

How can XML parsing errors be suppressed in the SimpleXML extension?

Options:

A.

error_reporting(E_ALL^E_NOTICE);

B.

simplexml_disable_errors(TRUE);

C.

simplexml_ignore_errors(TRUE);

D.

libxml_use_internal_errors(TRUE);

E.

simplexml_load_file( " file.xml " , LIBXML_NOERROR);

Buy Now
Questions 10

What is the name of the PHP function used to automatically load non-yet defined classes?

Options:

A.

Autoload()

B.

__autoload()

C.

__catch()

D.

Load()

E.

loadClass()

Buy Now
Questions 11

What is the result of the following code?

200-530 Question 11

Options:

A.

42

B.

43

C.

Parse error

Buy Now
Questions 12

When you need to process the values of columns in a database, you should:

Options:

A.

Only use built-in database functions

B.

Always use read the values as-is from the database and then process them with PHP

C.

Use built-in database functions for simple processing, and perform more complicated logic in PHP

D.

Use built-in database functions for complicated logic, and perform simpler functions in PHP

Buy Now
Questions 13

Which kind of encryption is provided by PHP ' s crypt functions ' ?

Options:

A.

One-way

B.

Two-way

C.

All of the above

D.

None of the above

Buy Now
Questions 14

What is the name of the method that can be used to provide read access to virtual properties in a class?

Options:

A.

__call()

B.

__get()

C.

__set()

D.

__wakeup()

E.

__fetch()

Buy Now
Questions 15

What can prevent PHP from being able to open a file on the hard drive (Choose 3)?

Options:

A.

File system permissions

B.

File is outside of open_basedir

C.

File is owned by another user and safe_mode is enabled.

D.

File is inside the /tmp directory.

E.

PHP is running as the web server user.

Buy Now
Questions 16

Which of the following is NOT a valid function declaration?

Options:

A.

function x ($x1 = array())

B.

function x (A $x1)

C.

function x (A $x1 = null)

D.

function x ($x1 = $x2)

Buy Now
Questions 17

What DOM method is used to load HTML files?

Options:

A.

load()

B.

loadXML()

C.

loadHTML()

D.

loadHTMLFile()

Buy Now
Questions 18

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);

Options:

A.

3

B.

4

C.

5

D.

6

Buy Now
Questions 19

You want to allow your users to submit HTML code in a form, which will then be displayed as real code and not affect your site layout. Which function do you apply to the text, when displaying it? (Choose 2)

Options:

A.

strip_tags()

B.

htmlentities()

C.

htmltidy()

D.

htmlspecialchars()

E.

showhtml()

Buy Now
Questions 20

What will the following code print?

echo addslashes( ' I am a < b > small < /b > " HTML " string, which is

\ ' invalid\ ' < /u > . ' );

Options:

A.

I am a < b > small < /b > " HTML " string, which is ' invalid ' < /u > .

B.

I am a < b > small < /b > \ " HTML\ " string, which is \ ' invalid\ ' < /u > .

C.

I am a < b > small < /b > \ " HTML\ " string, which is \\ ' invalid\\ ' < /u > .

D.

I am a < b > small < /b > \ " HTML\ " string, which is \\\ ' invalid\\\ ' < /u > .

E.

I am a \ < b\ > small\ < \/b\ > " HTML " string, which is ' invalid ' \ < \/u\ > .

Buy Now
Questions 21

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

Options:

A.

parse_url()

B.

url_parse()

C.

get_url_parts()

D.

geturlparts()

Buy Now
Questions 22

What is the output of the following code?

200-530 Question 22

Options:

Buy Now
Questions 23

Can a private static member be accessed from a public static method of the same class?

Options:

A.

Yes

B.

No

C.

Only if the class is defined as an abstract

Buy Now
Questions 24

What function allows resizing of PHP ' s file write buffer?

Options:

A.

ob_start()

B.

set_write_buffer()

C.

stream_set_write_buffer()

D.

Change the output_buffering INI setting via ini_set() function

Buy Now
Questions 25

The XML document below has been parsed into $xml via SimpleXML. How can the value of < foo > tag

accessed?

< ?xml version= ' 1.0 ' ? >

< document >

< bar >

< foo > Value < /foo >

< /bar >

< /document >

Options:

A.

$xml- > bar[ ' foo ' ]

B.

$xml- > bar- > foo

C.

$xml[ ' document ' ][ ' bar ' ][ ' foo ' ]

D.

$xml- > document- > bar- > foo

E.

$xml- > getElementByName( ' foo ' );

Buy Now
Questions 26

What does the chown() function do?

Options:

A.

Change the file permissions.

B.

Change the owner of the file.

C.

Change the group of the file.

D.

Checks if the file is accessible.

Buy Now
Questions 27

What is the output of the following code?

$a = ' a ' ; $b = ' b ' ;

echo isset($c) ? $a.$b.$c : ($c = ' c ' ). ' d ' ;

Options:

A.

abc

B.

cd

C.

0d

Buy Now
Questions 28

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)

< ?php

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();

? >

Options:

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()

Buy Now
Questions 29

Which of the following is NOT possible using reflection?

Options:

A.

Analysing of nearly any aspect of classes and interfaces

B.

Analysing of nearly any aspect of functions

C.

Adding class methods

D.

Implement dynamic construction (new with variable class name)

Buy Now
Questions 30

Which of the following code snippets is correct? (Choose 2)

a)

interface Drawable {

abstract function draw();

}

b)

interface Point {

function getX();

function getY();

}

c)

interface Line extends Point {

function getX2();

function getY2();

}

d)

interface Circle implements Point {

function getRadius();

}

Options:

A.

a)

B.

b)

C.

c)

D.

d)

Buy Now
Questions 31

What happens if you try to access a property whose name is defined in a parent class as private, and is not declared in the current class?

Options:

A.

An E_NOTICE error will be triggered.

B.

An E_ERROR error will be triggered.

C.

An E_WARNING error will be triggered.

D.

No errors will be triggered

Buy Now
Questions 32

Identify the security vulnerability in the following example:

1 < ?php

2 mail( ' feedback@example.org ' ,

3 ' Feddback ' ,

4 ' Here is my feedback. ' ,

5 " From: {$_COOKIE[ ' email ' ]} " );

6 ? >

Options:

A.

Remote Code Injection

B.

Cross-Site Request Forgeries

C.

Email Injection

D.

None of the above

Buy Now
Questions 33

How many elements does the array $matches from the following code contain?

1 < ?php

2 $str = " The cat sat on the roof of their house. " ;

3

4 $matches = preg_split( " /(the)/i " , $str, -1,

PREG_SPLIT_DELIM_CAPTURE);

5 ? >

Options:

A.

2

B.

3

C.

4

D.

7

E.

9

Buy Now
Questions 34

Which elements can be encapsulated by namespaces?

Options:

A.

Only classes

B.

Classes, functions and constants

C.

Classes, functions, constants and variables

Buy Now
Questions 35

Which of the following describes a PHP extension?

Options:

A.

A collection of PHP files that expose a unified API

B.

A collection of functions and classes that allow PHP to interact with external data sources, protocols or APIs

C.

A plugin that changes the way PHP behaves

D.

A multitude of classes that extend from a single parent class

Buy Now
Questions 36

What is the output of the following code?

200-530 Question 36

Options:

Buy Now
Questions 37

Which of the following functions are used to escape data within the context of HTML?

(Choose 2)

Options:

A.

htmlentities()

B.

addslashes()

C.

stripslashes()

D.

strip_tags()

E.

htmlspecialchars()

Buy Now
Questions 38

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

$a = 2;

$b = 3;

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

Options:

A.

0

B.

5

C.

8

D.

4

Buy Now
Questions 39

Which 2.17of the following formats is used to describe web services?

Options:

A.

WSDL

B.

UDDI

C.

SOAP

D.

XLANG

Buy Now
Questions 40

Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?

Options:

A.

Strip all occurrences of the string script.

B.

Strip all occurrences of the string javascript.

C.

Enable magic_quotes_gpc.

D.

None of the above.

Buy Now
Questions 41

You have a variable $test that contains sub-strings divided by a dash ( " - " ). How can you put every sub-string into an array element easily?

Options:

A.

extract($test, " - " );

B.

explode( " - " , $test);

C.

to_array($test, " - " );

D.

explode($test, " - " );

Buy Now
Questions 42

One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?

Options:

A.

html_display

B.

error_reporting

C.

display_errors

D.

error_log

E.

ignore_repeated_errors

Buy Now
Questions 43

Which technique should be used to speed up joins without changing their results?

Options:

A.

Add indices on joined columns

B.

Add a WHERE clause

C.

Add a LIMIT clause

D.

Use an inner join

Buy Now
Questions 44

The following form is loaded in a recent browser and submitted, with the second list element selected:

< form method= " post " >

< select name= " list " >

< option > one < /option >

< option > two < /option >

< option > three < /option >

< /select >

< /form >

In the server-side PHP code to deal with the form data, what is the value of $_POST [ ' list ' ]?

Options:

A.

1

B.

2

C.

two

D.

null (since the < code > value attribute of the list has not been set)

Buy Now
Questions 45

Identify the security vulnerability in the following example:

1 < ?php

2 echo " Welcome, {$_POST[ ' name ' ]}. " ;

3 ? >

Options:

A.

SQL Injection

B.

Cross-Site Scripting

C.

Remote Code Injection

D.

None of the above

Buy Now
Questions 46

What is the output of the following code?

200-530 Question 46

Options:

A.

false-false

B.

false-true

C.

true-false

D.

true-true

Buy Now
Questions 47

Which PHP function is used to validate whether the contents of $_FILES[ ' name ' ] [ ' tem_name ' ] have really been uploaded via HTTP ' ?

Options:

Buy Now
Questions 48

You work for a shared hosting provider, and your supervisor asks you to disable user scripts to dynamically load PHP extensions using the dl() function. How can you do this? (Choose 2)

Options:

A.

Set enable_dl to Off in the server ' s php.ini configuration file.

B.

Add dl to the current value of disable_functions in the server ' s php.ini configuration file.

C.

Add dl to the current value of disable_classes in the server ' s php.ini configuration file.

D.

Write a custom function called dl(), save it under the name prepend.inc and then set the auto_prepend_file directive to prepend.inc in php.ini.

Buy Now
Questions 49

What is the return value of the following code substr_compare( " foobar " , " bar " , 3);

Options:

A.

-1

B.

1

C.

TRUE

D.

0

E.

FALSE

Buy Now
Questions 50

In a typical web application the most used database action is...

Options:

A.

INSERT

B.

UPDATE

C.

SELECT

D.

CREATE

E.

ALTER

Buy Now
Questions 51

Which of the following is used to find all PHP files under a certain directory?

Options:

A.

PHPIterator

B.

RecursiveTreelterator

C.

RecursiveDirectorylterator

D.

SplTempFileObject

Buy Now
Questions 52

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

Options:

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, ' , ' , ' . ' )

Buy Now
Questions 53

After executing a query on a database server, PHP offers several functions to read the resulting lines, such as mysqli_fetch_assoc, pg_fetch_row, oci_fetch,etc.). If such functions do not return any rows, it means: (Choose 2)

Options:

A.

a SELECT statement returned no rows

B.

the transaction has been rolled back

C.

the connection to the database server was disconnected during query execution

D.

the query was too slow to execute

Buy Now
Questions 54

What is the output of the following script?

1 < ?php

2 function fibonacci ($x1, $x2)

3 {

4 return $x1 + $x2;

5 }

6

7 $x1 = 0;

8 $x2 = 1;

9

10 for ($i = 0; $i < 10; $i++) {

11 echo fibonacci($x1, $x2) . ' , ' ;

12 }

13 ? >

Options:

A.

1,2,3,4,5,6,7,8,9

B.

1,2,3,4,5,6,7,8,9,10,

C.

1,2,3,5,8,13,21,34,55,89,

D.

1,1,1,1,1,1,1,1,1,1,

Buy Now
Questions 55

Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?

Options:

A.

$_GET[ ' ALL ' ]

B.

$_SERVER[ ' QUERY ' ]

C.

$_SERVER[ ' QUERY_STRING ' ]

D.

$_ENV[ ' QUERY ' ]

E.

$QUERY_STRING

Buy Now
Questions 56

The constructs for(), foreach(), and each() can all be used to iterate an object if the object

Options:

A.

implements ArrayAccess

B.

implements Iterator

C.

implements Iterator and ArrayAccess

D.

None of the above

Buy Now
Questions 57

Which combination of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?

Options:

A.

Strip all occurrences of the string $lt; script.

B.

Strip all occurrences of the string javascript.

C.

Enable magic_quotes_gpc .

D.

None of the above.

Buy Now
Questions 58

What function can reverse the order of values in an array without the loss of key information?

Options:

A.

array_flip()

B.

array_reverse()

C.

rsort()

D.

krsort()

E.

array_multisort()

Buy Now
Questions 59

Which function can help prevent cross-site scripting? (Choose 2)

Options:

A.

addslashes()

B.

htmlentities()

C.

htmlspecialchars()

D.

strip_tags()

E.

quotemeta()

Buy Now
Questions 60

What is the output of the following code: echo " 1 " + 2 * " 0x02 " ;

Options:

A.

1

B.

3

C.

5

D.

20

E.

7

Buy Now
Questions 61

Which of the following functions can help prevent session fixation vulnerabilities?

Options:

A.

magic_quotes_gpc()

B.

strip_tags()

C.

addslashes()

D.

session_regenerate_id()

Buy Now
Questions 62

What is the output of the following code:

str_replace(array( " Apple " , " Orange " ), array( " Orange " , " Apple " ), " Oranges are orange and Apples are green " );

Options:

A.

Apples are orange and Oranges are green

B.

Apples are orange and Apples are green

C.

Apples are apple and Oranges are green

D.

Apples are apple and Apples are green

Buy Now
Questions 63

What is the name of the key in $_FILES[ ' name ' ] that contains the number of bytes of the uploaded file?

Options:

Buy Now
Questions 64

Is the following code piece E_STRICT compliant?

final class Testing {

private $test;

public function tester() {

return " Tested! " ;

}}

Options:

A.

Yes

B.

No

Buy Now
Questions 65

Given the following code, what will be the value of $a?

$a = array( ' a ' , ' b ' );

array_push($a, array(1, 2));

Options:

A.

array( ' a ' , ' b ' , 1, 2)

B.

array(1, 2, ' a ' , ' b ' )

C.

array(array(1, 2), ' a ' , ' b ' )

D.

None of the above

Buy Now
Questions 66

What is the result of the following code?

200-530 Question 66

Options:

A.

Parse error

B.

3.14

C.

PI

D.

T::PI

Buy Now
Questions 67

Consider the following code:

strspn($test, ' aeiou ' , 1);

The variable $test contains the string " You get certified " .

What will the function call return?

Options:

A.

true

B.

false

C.

0

D.

1

E.

2

F.

3

Buy Now
Questions 68

Type hinting in PHP allows the identification of the following variable types: (Choose 2)

Options:

A.

String

B.

Integer

C.

Array

D.

Any class or interface type

Buy Now
Questions 69

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

Options:

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

Buy Now
Questions 70

Where does the session extension store the session data by default?

Options:

A.

SQLite Database

B.

MySQL Database

C.

Shared Memory

D.

File system

E.

Session Server

Buy Now
Questions 71

You want to access the 3rd character of a string, contained in the variable $test. Which of the following possibilities work?(Choose 2)

Options:

A.

echo $test(3)

B.

echo $test[2];

C.

echo $test(2);

D.

echo $test{2};

E.

echo $test{3}

Buy Now
Questions 72

Given the following code, what is correct?

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

}

$z = new stdClass;

f($z);

var_dump($z);

Options:

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

Buy Now
Questions 73

The following form is loaded in a browser and submitted, with the checkbox activated:

< form method= " post " >

< input type= " checkbox " name= " accept " >

< form >

In the server-side PHP code to deal with the form data, what is the value of $_POST[ ' accept ' ]?

Options:

A.

accept

B.

ok

C.

true

D.

on

Buy Now
Questions 74

Under which circumstances is the $_SESSION super-global available? (Choose 2)

Options:

A.

If session_start() was called.

B.

If session.auto_start INI setting is enabled.

C.

Always available in PHP 5.

D.

If a valid session id is passed via GET, POST or COOKIE.

E.

If register_globals are enabled.

Buy Now
Questions 75

What will the $array array contain at the end of this script?

1 < ?php

2 function modifyArray ( & $array)

3 {

4 foreach ($array as & $value)

5 {

6 $value = $value + 1;

7 }

8

9 $value = $value + 2;

10 }

11

12 $array = array (1, 2, 3);

13 modifyArray($array);

14 ? >

Options:

A.

2, 3, 4

B.

2, 3, 6

C.

4, 5, 6

D.

1, 2, 3

Buy Now
Questions 76

You want to extract the pieces of a date string, which looks like this:

" 2005-11-02 " . Which of the following pieces of code will properly assign $year,

$month and $day with their respective values?

Options:

A.

sscanf( " 2005-11-02 " , ' %d-%d-%d ' , $year, $month, $day);

B.

scan( " 2005-11-02 " , ' %d-%d-%d ' , $year, $month, $day);

C.

sscanf( ' %d-%d-%d ' , " 2005-11-02 " , $year, $month, $day);

D.

sscan($year, $month, $date ' %d-%d-%d ' , " 2005-11-02 " );

Buy Now
Exam Code: 200-530
Exam Name: Zend PHP 5.3 Certification
Last Update: Apr 30, 2026
Questions: 254

PDF + Testing Engine

$63.52  $181.49

Testing Engine

$50.57  $144.49
buy now 200-530 testing engine

PDF (Q&A)

$43.57  $124.49
buy now 200-530 pdf