<?php
$list = [1, 2, 3, 4, 5, 6, 7, 8, 9];
$key = array_rand($list, 3);
echo $list[$key];
?>
- Output for 8.0.1 - 8.0.22, 8.1.0 - 8.1.9
- Fatal error: Uncaught TypeError: Illegal offset type in /in/PeroX:5
Stack trace:
#0 {main}
thrown in /in/PeroX on line 5
Process exited with code 255. - Output for 7.4.0 - 7.4.30
- Warning: Illegal offset type in /in/PeroX on line 5
preferences:
68.73 ms | 401 KiB | 66 Q