3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_key = uniqid("\x00"); if (preg_match('/[a-zA-Z]/', $my_key)) { echo "key has alpha chars\n"; } $my_key = preg_replace('/[a-zA-Z]/', "4", $my_key); var_dump(is_numeric($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'; } }

preferences:
35.38 ms | 402 KiB | 5 Q