<?php
function randomString($length = 6) {
$str = "";
$characters = array_merge(range('a','z'), range('0','9'));
$max = count($characters) - 1;
for ($i = 0; $i < $length; $i++) {
$rand = mt_rand(0, $max); $str .= $characters[$rand];
}
return $str . time(). randomString();
}
echo randomString();
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1
- Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/MKiQj on line 5
Process exited with code 255. - Output for 5.6.0 - 5.6.28
- Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2 bytes) in /in/MKiQj on line 5
Process exited with code 255. - Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38
- Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/MKiQj on line 5
Process exited with code 255. - Output for 5.3.0 - 5.3.29
- Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/MKiQj on line 5
Process exited with code 255. - Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Process exited with code 139.
preferences:
189.14 ms | 402 KiB | 232 Q