3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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>';
based on JW4oe
Output for 7.0.0 - 7.2.0
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.3.18 - 5.6.28
Fatal error: Call to undefined function array_shuffle() in /in/KaPQP on line 9
Process exited with code 255.