3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Test; function enum() { for($enums = func_get_args(), $enum = reset($enums), $i = 1; $enum; $enum = next($enums), ++$i) { const $enum = $i; } } // enum() enum('CONST0', 'CONST1', 'CONST2');
Output for 5.4.0 - 5.4.9
Parse error: syntax error, unexpected 'const' (T_CONST) in /in/EpR5p on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.19
Parse error: syntax error, unexpected T_CONST in /in/EpR5p on line 8
Process exited with code 255.