3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { const VALUE0 = 0; const VALUE1 = 1; const VALUE2 = 2; const VALUES = array( self::VALUE0 = 'a', self::VALUE1 = 'b', self::VALUE2 = 'c' ); } class Bar { const SOMEVALUE = Foo::VALUES[Foo::VALUE0]; } var_dump(Bar::SOMEVALUE);
Output for 5.3.0 - 5.4.28
Parse error: syntax error, unexpected '=', expecting ')' in /in/FmSkb on line 10
Process exited with code 255.