3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} class Bar { public function __construct(Foo $foo = 'baz') { $this->foo = $foo; } } var_dump(new Bar());
Output for 5.3.0 - 5.4.17
Fatal error: Default value for parameters with a class type hint can only be NULL in /in/00qAt on line 6
Process exited with code 255.