On compilation. the following PHP 7.1 code was supposed to produce the output 24.
the code lines with errors.
1.
2.
3. class example
4- {
5. public $foo;
G.
7. public function__construct()[
8. $this->function = foo()[
9. return 24;
10. };
11. }
12. }
13. $exp = new example(]:
14. echo ($cxp->function)(). PHP_EOL;
Correct Answer:
Line 8
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PHP 5 MCQ Questions