zend 200-710 Exam Questions

Questions for the 200-710 were updated on : Nov 21 ,2025

Page 1 out of 16. Viewing questions 1-15 out of 232

Question 1

Which PHP function sets a cookie and URL encodes its value when sending it to the browser?

Answer:

setcookie,
setcookie()

Discussions
0 / 1000

Question 2

Which PHP function sets a cookie whose value does not get URL encoded when sending it to the
browser?

Answer:

setrawcookie,
setrawcookie()

Discussions
0 / 1000

Question 3

An HTML form contains this form element:
<input type="image" name="myImage" src="image.png" />
The user clicks on the image to submit the form. How can you now access the relative coordinates of
the mouse click?

  • A. $_FILES['myImage']['x'] and $_FILES['myImage']['y']
  • B. $_POST['myImage']['x'] and $_POST['myImage']['y']
  • C. $_POST['myImage.x'] and $_POST['myImage.y']
  • D. $_POST['myImage_x'] and $_POST['myImage_y']
Answer:

D

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 4

Which of the following is NOT a requirement for file uploads to work?

  • A. The PHP directive file_uploads must be set to On
  • B. The form's method attribute must be set to "post"
  • C. The form must include a hidden input element with the name set to "MAX_FILE_SIZE"
  • D. The form's enctype attribute must be set to "multipart/form-data"
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 5

The following form is loaded in a recent browser and submitted, with the second select option
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'] ?

  • A. 1
  • B. 2
  • C. two
  • D. null
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 6

Please provide the name of the super-global variable where all the information about cookies is
available.

Answer:

$_COOKIE,
$_COOKIE[\],
_COOKIE, _COOKIE[\]

Discussions
0 / 1000

Question 7

When uploading a file to a PHP script using the HTTP PUT method, where would the file data be
found?

  • A. the $_FILES super-global
  • B. the input stream php://input
  • C. the $_POST super-global
  • D. the global variable scope
Answer:

B

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 8

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'] ?

  • A. accept
  • B. ok
  • C. true
  • D. on
Answer:

D

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 9

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
Answer:

D

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 10

Which PHP function retrieves a list of HTTP headers that have been sent as part of the HTTP response
or are ready to be sent?

  • A. header()
  • B. headers()
  • C. headers_list()
  • D. headers_sent() E: getresponseheaders()
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 11

An HTML form contains this form element:
<input type="file" name="myFile" />
When this form is submitted, the following PHP code gets executed:
move_uploaded_file(
$_FILES['myFile']['tmp_name'],
'uploads/' . $_FILES['myFile']['name']
);
Which of the following actions must be taken before this code may go into production? (Choose 2)

  • A. Check with is_uploaded_file() whether the uploaded file $_FILES['myFile']['tmp_name'] is valid
  • B. Sanitize the file name in $_FILES['myFile']['name'] because this value is not consistent among web browsers
  • C. Check the charset encoding of the HTTP request to see whether it matches the encoding of the uploaded file
  • D. Sanitize the file name in $_FILES['myFile']['name'] because this value could be forged
  • E. Use $HTTP_POST_FILES instead of $_FILES to maintain upwards compatibility
Answer:

B, D

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 12

Which string will be returned by the following function call?
$test = '/etc/conf.d/wireless';
substr($test, strrpos($test, '/')); // note that strrpos() is being called, and not strpos()

  • A. ""
  • B. "/wireless"
  • C. "wireless"
  • D. "/conf.d/wireless" E: "/etc"
Answer:

B

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 13

How many elements does the array $pieces contain after the following piece of code has been
executed?
$pieces = explode("/", "///");

  • A. 0
  • B. 3
  • C. 4
  • D. 5
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 14

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 page layout. Which function do you apply to the text, when displaying it?
(Choose 2)

  • A. strip_tags()
  • B. htmlentities()
  • C. htmltidy()
  • D. htmlspecialchars() E: showhtml()
Answer:

B, D

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 15

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

  • A. -1
  • B. 1
  • C. TRUE
  • D. 0 E: FALSE
Answer:

D

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000
To page 2