3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface I { const NAME = self::class; const FOO = 'A Class Named ' . self::NAME; } class C implements I {} echo C::FOO;
based on KN1Y9
Output for 5.6.8 - 7.2.0
A Class Named I
Output for 5.5.24 - 5.5.35
Parse error: syntax error, unexpected '.', expecting ',' or ';' in /in/ra1uH on line 5
Process exited with code 255.
Output for 5.4.2 - 5.4.45
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) in /in/ra1uH on line 4
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_CLASS, expecting T_STRING in /in/ra1uH on line 4
Process exited with code 255.