3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { private $greeting; public function __contruct() { $this->greeting = "Hello "; } public function greeting($name) { function() use($name) { return $this->greeting . $name; } } } $test = new Test; echo $test->greeting("Nico");
Output for 5.3.0 - 5.4.19
Parse error: syntax error, unexpected '}' in /in/0B5OD on line 18
Process exited with code 255.