3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); define('LOL', 1, true); define('LOL', 2); var_dump(Lol, LOL, lol, constant('Lol'), constant('LOL'), constant('lol'));
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
int(1) int(2) int(1) int(1) int(2) int(1)
Output for hhvm-3.10.0 - 3.12.0
Warning: Case insensitive constant names are not supported in HipHop in /in/Hho4Y on line 4 Notice: Constant LOL already defined in /in/Hho4Y on line 5 Notice: Use of undefined constant Lol - assumed 'Lol' in /in/Hho4Y on line 7 Notice: Use of undefined constant lol - assumed 'lol' in /in/Hho4Y on line 7 Warning: constant(): Couldn't find constant Lol in /in/Hho4Y on line 7 Warning: constant(): Couldn't find constant lol in /in/Hho4Y on line 7 string(3) "Lol" int(1) string(3) "lol" NULL int(1) NULL