3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const A = "FooA"; const B = self::A . self::C; const C = "FooC"; } class Bar extends Foo { const A = "BarA"; const C = "BarC"; } var_dump(Bar::B);

preferences:
30.38 ms | 404 KiB | 5 Q