3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "A-MTP-"; $i = 1; $j=1; $s=1; while ($i < 4) { $ch="ch".$s ; $ch= "$".$ch; $$ch =array(); while($j < 13) { $$ch[$s] = $a."-".$i."-".$j ; if($j % 4 == 0) { $s++; } $j++; } $i++; } print_r($$ch1);

preferences:
42.62 ms | 402 KiB | 5 Q