3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ const X = 1; const Y = static::X; } class B extends A{ const X=2; } echo B::Y;
Output for 5.3.0 - 5.3.18, 5.4.0 - 5.4.8
Fatal error: "static::" is not allowed in compile-time constants in /in/v6Bp9 on line 4
Process exited with code 255.

preferences:
174.05 ms | 1395 KiB | 35 Q