Zend
200-530 · Question #205
200-530 Question #205: Real Exam Question with Answer & Explanation
Sign in or unlock 200-530 to reveal the answer and full explanation for question #205. The question stem and answer options stay visible for context.
Question
What is the error in the following declaration of a static class method? 1 <?php 2 class car { 3 static $speeds = array( Zend 200-530 Exam 4 'fast', 5 'slow', 6 'medium', 7 ); 9 static function getSpeeds() 10 { 11 return $this->speeds; 12 } 13 } 14 ?>
Options
- AStatic methods must not return a value.
- BThe use of $this from within static methods is not possible.
- CStatic methods need the method keyword instead of the function keyword.
- DThere is no static keyword in PHP.
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.