Free 200-530 – Zend PHP 5.3 Certification Practice Test Question

Free demo downloads

Loading demo links...

Showing 7–9 of 15 questions

Question 7

An HTML form contains this form element

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)

Select all that apply, then click Submit answer.

  • ○

    Check with is_uploaded_file() whether the uploaded file $_FILES['myFile']['tmp_name'] is valid

  • ○

    Sanitize the file name in $_FILES['myFile']['name'] because this value is not consistent among web browsers

  • ○

    Check the charset encoding of the HTTP request to see whether it matches the encoding of the uploaded file

  • ○

    Sanitize the file name in $_FILES['myFile']['name'] because this value could be forged

  • ○

    Use $HTTP_POST_FILES instead of $_FILES to maintain upwards compatibility


Question 8

What PHP function can be used to remove a local file?

Select an option, then click Submit answer.

  • ○

    A) rmdir()

  • ○

    B) unlink()

  • ○

    C) rm()

  • ○

    D) delete()

  • ○

    E) delete_file()


Question 9

Consider the following code:

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

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

What will the function call return?

Select an option, then click Submit answer.

  • ○

    true

  • ○

    false

  • ○

    0

  • ○

    1

  • ○

    2

  • ○

    3