<?php
abstract class Base
{
public function __call($name, array $params)
{
echo $name;
throw $this;
return $this;
}
}
class A extends Base
{
public function Launch()
{
echo "Launch<BR>";
var_dump(get_class($this));
}
}
$A = new A;
$A->somestrange();
$A->Launch();
?>
somestrange
Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in /in/74IjQ:8
Stack trace:
#0 /in/74IjQ(24): Base->__call('somestrange', Array)
#1 {main}
thrown in /in/74IjQ on line 8
Process exited with code 255.