3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $my_key = uniqid("\x00"); $var[$my_key] = TRUE; foreach($var as $key => $val) { if ($key === $my_key) { echo 'You got it right'; } else { echo 'You got it wrong'; } }
based on SP8bn
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
You got it right