- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.29, 5.6.8 - 5.6.13
- Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/vS24o on line 10
Process exited with code 255.
<?php
interface FooInterface
{
public function bar();
}
$class = (class implements FooInterface {
public function bar()
{
return new Bar();
}
});
var_dump((new $class)->bar());