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:
33.76 ms | 404 KiB | 5 Q