- Output for 7.1.0 - 7.1.17, 7.2.0 - 7.2.6
- Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /in/d1TDf on line 25
Process exited with code 255.
<?php
class A {
public function foo(): Closure {
$b = new B();
return function() use ($b) {
$b->bar();
};
}
}
?>
<?php
use Biz\ImportedException;
class B {
public function bar()
{
throw new ImportedException();
}
}
?>
<?php
namespace Biz;
use \Exception;
class ImportedException extends Exception {
}
?>
<?php
$a = new A();
$closure = $a->foo();
$closure();
?>