3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function trues() { foreach(get_defined_constants() as $k => $v) if(strtolower($k) === "true") var_dump($k,v); } trues(); echo "----\n"; define('TRUE', 3); trues();
based on 8CeTD
Output for 7.0.0 - 7.1.0
Notice: Use of undefined constant v - assumed 'v' in /in/lcm1Ti on line 5 string(4) "TRUE" string(1) "v" ---- Notice: Use of undefined constant v - assumed 'v' in /in/lcm1Ti on line 5 string(4) "TRUE" string(1) "v" Notice: Use of undefined constant v - assumed 'v' in /in/lcm1Ti on line 5 string(4) "TRUE" string(1) "v"
Output for 4.3.0 - 5.6.28
Notice: Use of undefined constant v - assumed 'v' in /in/lcm1Ti on line 5 string(4) "TRUE" string(1) "v" ---- Notice: Use of undefined constant v - assumed 'v' in /in/lcm1Ti on line 5 string(4) "TRUE" string(1) "v"