3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('FRAMEWORK_PATH', 'aaaaa/'); class A { static $a=[ 'ContextProcessors.i18n', 'ContextProcessors.tz', 'ContextProcessors.request', 'ContextProcessors.base_url', ]; const b = [ 'ContextProcessors.i18n', 'ContextProcessors.tz', 'ContextProcessors.request', 'ContextProcessors.base_url', ];; } class B extends A { static $a=1; const b = 2; } var_dump(A::$a); var_dump(A::b);
Output for 5.4.0 - 5.4.23
Fatal error: Arrays are not allowed in class constants in /in/UFOVT on line 18
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/UFOVT on line 7
Process exited with code 255.