3v4l.org

run code in 300+ PHP versions simultaneously
<?php //define('B', 'pre'); class test { @const A = B; static function name() { echo self::A . 'key'; } static function init() { self::name(); } } test::init();
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0
Parse error: syntax error, unexpected '@', expecting function (T_FUNCTION) in /in/lhUcQ on line 6
Process exited with code 255.

preferences:
172.27 ms | 1395 KiB | 24 Q