<?php
namespace LOLOL;
abstract class Abs {
public function __toString()
{
return strtolower(class_name($this));
/* Should print test, not abs :P */
}
}
class Test extends Abs
{
}
$x = new Test;
echo $x;
Fatal error: Uncaught Error: Call to undefined function LOLOL\class_name() in /in/HH5ZN:8
Stack trace:
#0 /in/HH5ZN(18): LOLOL\Abs->__toString()
#1 {main}
thrown in /in/HH5ZN on line 8
Process exited with code 255.
Fatal error: Method LOLOL\Test::__toString() must not throw an exception, caught Error: Call to undefined function LOLOL\class_name() in /in/HH5ZN on line 0
Process exited with code 255.
Output for 7.0.0
Fatal error: Method LOLOL\Test::__toString() must not throw an exception in /in/HH5ZN on line 0
Process exited with code 255.