3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $var; public function __construct() { $this->var = 1; } } function foo { return 1; } $foo = Foo(); $f = new foo; var_dump($foo); var_dump($f);
Output for 5.3.0 - 5.4.13
Parse error: syntax error, unexpected '{', expecting '(' in /in/rZeM3 on line 14
Process exited with code 255.