- Output for 5.6.38, 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
- Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/sBkcd on line 3
Process exited with code 255.
1. <?php
2.
class example
4. {
5. public $foo;
6.
7. public function__construct() {
8. $this->function = foo() {
9. return 24;
10. };
11. }
12. }
13. $exp = new example();
14. echo ($exp->function)(), PHP_EOL;