<?php
namespace \One;
abstract class Abs {
public function __toString()
{
return strtolower(get_called_class());
/* Should print test, not abs :P */
}
}
namespace \Two;
class Test extends \One\Abs
{
}
$x = new \Two\Test;
echo $x;
Fatal error: Uncaught Error: Undefined constant 'One' in /in/HYsWO:2
Stack trace:
#0 {main}
thrown in /in/HYsWO on line 2
Process exited with code 255.
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/HYsWO on line 2
Parse error: syntax error, unexpected T_STRING in /in/HYsWO on line 2
Process exited with code 255.
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/HYsWO on line 2
Parse error: parse error, unexpected T_STRING in /in/HYsWO on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/HYsWO on line 2
Parse error: parse error in /in/HYsWO on line 2
Process exited with code 255.