nerdexam
Zend

200-530 · Question #249

200-530 Question #249: Real Exam Question with Answer & Explanation

Sign in or unlock 200-530 to reveal the answer and full explanation for question #249. The question stem and answer options stay visible for context.

Question

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) Zend 200-530 Exam <?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

  • AChange var to public or private
  • BChange function Car to function_construct
  • CChange "I drive a $this->model." to "I drive a {$this->model}."
  • DChange function toString()to static function toString()

Unlock 200-530 to see the answer

You've previewed enough free 200-530 questions. Unlock 200-530 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 200-530 Practice
Which of the listed changes would you make to the following PHP 4... | 200-530 Q#249 Answer | NerdExam