Zend Certified Engineer v1.0

Page:    1 / 6   
Exam contains 87 questions

Under what condition may HTTP headers be set from PHP if there is content echoed prior to the header function being used?

  • A. headers_sent() returns true
  • B. Output buffering is enabled
  • C. The client supports local buffering
  • D. The webserver uses preemptive mode


Answer : B

What is the output of the following code?


  • A. 123
  • B. 213
  • C. 142
  • D. 214
  • E. Syntax error


Answer : D

Which of the following is NOT true about PHP traits? (Choose two.)

  • A. Multiple traits can be used by a single class
  • B. A trait can implement an interface
  • C. A trait can declare a private variable.
  • D. Traits are able to be auto-loaded.
  • E. Traits automatically resolve conflicts based on definition order.


Answer : BE

What Content-Type HTTP header value is required when sending an HTTP POST request using JavaScript to ensure that PHP can access the data?

  • A. application/x-www-form-urlencoded
  • B. http/post
  • C. text/html
  • D. object/multipart-formdata


Answer : B

Which of the following are NOT acceptable ways to create a secure password hash in PHP? (Choose two.)

  • A. md5()
  • B. hash_pbkdf2()
  • C. password_hash()
  • D. crypt()
  • E. openssl_digest()


Answer : AE

An HTML form has two submit buttons. After submitting the form, how can you determine with PHP which button was clicked?

  • A. An HTML form may only have one button.
  • B. You cannot determine this with PHP only. You must use JavaScript to add a value to the URL depending on which button has been clicked.
  • C. Put two buttons in different forms, but make sure they have the same name.
  • D. Assign name and value attributes to each button and use $_GET or $_POST to find out which button has been clicked.


Answer : D

An HTML form contains this form element:


When this form is submitted, the following PHP code gets executed:

Which of the following actions must be taken before this code may go into production? (Choose two.)

  • 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 : BD

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

What is the output of the following code?


  • A. 1
  • B. 2
  • C. null


Answer : B

Assuming UTF-8 encoding, what is the value of $count?
$data == "˜$la2"™;
$count = strlen("˜$data"™);

  • A. 4
  • B. 5
  • C. 7
  • D. 0


Answer : B

Given a php.ini setting of -
default_charset = utf-8
what will the following code print in the browser?


  • A. Three Unicode characters, or unreadable text, depending on the browser
  • B. & # 9986 ; & # 10004 ; & # 10013
  • C. A blank line due to charset mismatch


Answer : C

Consider the following table data and PHP code. What is the outcome?
Table data (table name "users" with primary key "id"):


PHP code (assume the PDO connection is correctly established):

  • A. The INSERT will succeed and the user will see the "Success!" message.
  • B. The INSERT will fail because of a primary key violation, and the user will see the "Success!" message.
  • C. The INSERT will fail because of a primary key violation, and the user will see a PDO warning message.
  • D. The INSERT will fail because of a primary key violation, and the user will see the "Failure!" message.


Answer : B

What is the benefit of using persistent database connections in PHP? (Choose two.)

  • A. Reduces the connection & authentication overhead of connecting to the database
  • B. Ensures that only a single connection is open to the database from PHP
  • C. Allows connection settings such as character set encoding to persist
  • D. Allows for resumption of transactions across multiple requests.


Answer : CD

What is the output of the following code?


  • A. MyNamespace\Test
  • B. empty string
  • C. parse error
  • D. Test


Answer : A

FILL BLANK -
What is the output of the following code?




Answer : 1

Page:    1 / 6   
Exam contains 87 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy