- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.17
- Fatal error: Default value for parameters with a class type hint can only be NULL in /in/HtVIu on line 6
Process exited with code 255.
<?php
class Foo {}
class Bar
{
public function __construct(Foo $foo = 'baz')
{
$this->foo = $foo;
}
}
var_dump(new Bar());