3v4l.org

run code in 300+ PHP versions simultaneously
<?php $largegroups = ['','','','']; $c = 0; foreach ($largegroups as $key => $users) { // loops 4 times for ($i = 1; $i <= 4; $i++) { ++$c; $c = str_pad($c, 2, '0', STR_PAD_LEFT); echo "\n".$groupname = 'Group ' . $c; } }
Output for 7.1.0 - 7.1.33, 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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Group 01 Group 02 Group 03 Group 04 Group 05 Group 06 Group 07 Group 08 Group 09 Group 10 Group 11 Group 12 Group 13 Group 14 Group 15 Group 16

preferences:
154.85 ms | 408 KiB | 5 Q