3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $my_key = uniqid("\x00"); if (preg_match('/a-zA-Z/', $my_key)) { echo "key has alpha chars\n"; } $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 0P9E8
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