3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo() { protected $bar; protected $foobar; public $mybar; public function getBar() { return $this->bar; } } var_dump(json_encode(new Foo));
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '(', expecting '{' in /in/hl8bG on line 3
Process exited with code 255.