3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function get() { return SOME_CONST; } define('sOmE_CoNsT', 1, true); echo get(); // Prints 1 define('SOME_CONST', 2); echo get(); // Prints 2
based on 8atvM
Output for 5.4.0 - 5.6.30, 7.0.0 - 7.1.12
11
Output for hhvm-3.22.0
Warning: Case insensitive constant names are not supported in HipHop in /in/L6nCp on line -1 Notice: Use of undefined constant SOME_CONST - assumed 'SOME_CONST' in /in/L6nCp on line -1 SOME_CONST2
Output for hhvm-3.10.1 - 3.21.3
Warning: Case insensitive constant names are not supported in HipHop in /in/L6nCp on line 5 Notice: Use of undefined constant SOME_CONST - assumed 'SOME_CONST' in /in/L6nCp on line 3 SOME_CONST2
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.3.29
12
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/L6nCp on line 9
Process exited with code 255.