- strtolower: documentation ( source)
<?php
abstract class Abs {
public function __toString()
{
return strtolower((new \ReflectionClass($this))->getShortName());
/* Should print test, not abs :P */
}
}
class Test extends Abs
{
}
$x = new Test;
echo $x;
$y = new Abs;echo $y;