3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = str_split('ABCDEFGHIJK'); $collecte = array_keys($list); for($i=0;$i<100;$i++) { $shuffle = $list; array_shuffle($shuffle); foreach($shuffle as $pos=>$letter) $collecte[$pos][]=$etter; } foreach($collecte as $pos=>$collection) $collecte[$pos] = array_count_values($collection); $table=array(); foreach($collecte as $pos=>$collection) foreach($list as $letter) $table[$letter][$pos]='<td>'.$collection[$letter].'</td>'; echo '<table>'; foreach($table as $letter=>$ligne) { ksort($table[$letter]); echo '<tr>'.implode('',$table[$letter]).'</tr>'; } echo '</table>';
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function array_shuffle() in /in/KaPQP:9 Stack trace: #0 {main} thrown in /in/KaPQP on line 9
Process exited with code 255.
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Call to undefined function array_shuffle() in /in/KaPQP on line 9
Process exited with code 255.

preferences:
200.39 ms | 402 KiB | 241 Q