Free 200-550 Exam Braindumps
Zend Certified PHP Engineer Questions 56–60 (page: 13)

Updated On: 9-Feb-2026

Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?

  1. 'Hello, world!'
  2. function(){ alert("Hello, world!"); }
  3. array('Hello, world!')
  4. array('message' => 'Hello, world!')

Answer(s): B



Which of the following will NOT instantiate a DateTime object with the current timestamp?

  1. $date = new DateTime();
  2. $date = new DateTime('@' . time());
  3. $date = new DateTime('now');
  4. $date = new DateTime(time());

Answer(s): D



Given a DateTime object that is set to the first second of the year 2014, which of the following samples will correctly return a date in the format '2014-01-01 00:00:01'?

  1. $datetime->format('%Y-%m-%d %h:%i:%s')
  2. $datetime->format('%Y-%m-%d %h:%i:%s', array('year', 'month', 'day', 'hour', 'minute', 'second'))
  3. $datetime->format('Y-m-d H:i:s')
  4. $date = date('Y-m-d H:i:s', $datetime);

Answer(s): C



Given the following DateTime objects, what can you use to compare the two dates and indicate that $date2 is the later of the two dates?
$date1 = new DateTime('2014-02-03');
$date2 = new DateTime('2014-03-02');

  1. $date2 > $date1
  2. $date2 < $date1
  3. $date1->diff($date2) < 0
  4. $date1->diff($date2) > 0

Answer(s): A



Given the following DateTime object, which sample will NOT alter the date to the value '2014-02- 15'?
$date = new DateTime('2014-03-15');

  1. $date->sub(new DateInterval('P1M'));
  2. $date->setDate(2014, 2, 15);
  3. $date->modify('-1 month');
  4. $date->diff(new DateInterval('-P1M'));

Answer(s): D



Viewing page 13 of 46
Viewing questions 61 - 65 out of 223 questions


Post your Comments and Discuss Zend 200-550 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!