3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = 16; list($usec, $sec) = explode(' ', microtime()); mt_srand((float) $sec + ((float) $usec * 100000)); $inputs = array_merge(range('z','a'),range(0,9),range('A','Z')); for($i=0; $i<$length; $i++) { $key .= $inputs{mt_rand(0,61)}; } return strtoupper($key);
Output for 7.4.0 - 7.4.1
Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/WjiXP on line 10 Notice: Undefined variable: key in /in/WjiXP on line 10
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13
Notice: Undefined variable: key in /in/WjiXP on line 10

preferences:
123.61 ms | 402 KiB | 157 Q