3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input); var_dump(rand_keys);
Output for 7.2.0
Warning: Use of undefined constant rand_keys - assumed 'rand_keys' (this will throw an Error in a future version of PHP) in /in/4SdWM on line 4 string(9) "rand_keys"
Output for 4.3.0 - 7.1.7
Notice: Use of undefined constant rand_keys - assumed 'rand_keys' in /in/4SdWM on line 4 string(9) "rand_keys"