Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 7 Question 35 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 35
Topic #: 7
[All 200-710 Questions]

Which line of code can be used to replace the INSERT comment in order to output "hello"?

class C {

public $ello = 'ello';

public $c;

public $m;

function __construct($y) {

$this->c = static function($f) {

// INSERT LINE OF CODE HERE

};

$this->m = function() {

return "h";

};

}

}

$x = new C("h");

$f = $x->c;

echo $f($x->m);

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Letha
5 days ago
I think the answer is A) return $this->m() . 'ello'. It makes sense to concatenate 'h' from $this->m() with 'ello'.
upvoted 0 times
...

Save Cancel