3v4l.org

run code in 200+ 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 lcm1Ti
Output for 7.0.0 - 7.1.10
string(4) "TRUE" bool(true) ---- string(4) "TRUE" bool(true) string(4) "TRUE" int(3)
Output for 4.3.0 - 5.6.28
string(4) "TRUE" bool(true) ---- string(4) "TRUE" int(3)