3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ID8 { const HOST = 'test'; } class a implements ID8 { public $b = static::HOST; } $ab = new a(); print $ab->b;
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.7 - 5.6.14
Fatal error: "static::" is not allowed in compile-time constants in /in/YuhvK on line 8
Process exited with code 255.

preferences:
200.64 ms | 1387 KiB | 67 Q