3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $my_key = uniqid("\x00"); if (preg_match('/[a-zA-Z]/', $my_key)) { echo "key has alpha chars\n"; } preg_replace('/[a-zA-Z]/', "4", $my_key); $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 9pu4V
Output for 4.3.0 - 7.1.7
key has alpha chars You got it right