3v4l.org

run code in 300+ PHP versions simultaneously
<?php $beta_lists = array ( 'Apple' => 'http://www.abc.mno/apple/', 'Ball' => 'http://www.abc.mno/ball/', 'Builders' => 'http://www.abc.mno/builders/', 'Bowling' => 'http://www.abc.mno/bowling/', 'Correct' => 'http://www.abc.mno/correct/', 'Campaign' => 'http://www.abc.mno/compain/', 'Direct' => 'http://www.abc.mno/direct/', 'Degree' => 'http://www.abc.mno/degree/' ); ksort($beta_lists); $groups = array(); foreach ($beta_lists as $title => $value) { $groups[$title[0]][$title] = $value; } print_r($groups); echo count($groups);
Output for 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.28, 8.4.1 - 8.4.14, 8.5.0
Array ( [A] => Array ( [Apple] => http://www.abc.mno/apple/ ) [B] => Array ( [Ball] => http://www.abc.mno/ball/ [Bowling] => http://www.abc.mno/bowling/ [Builders] => http://www.abc.mno/builders/ ) [C] => Array ( [Campaign] => http://www.abc.mno/compain/ [Correct] => http://www.abc.mno/correct/ ) [D] => Array ( [Degree] => http://www.abc.mno/degree/ [Direct] => http://www.abc.mno/direct/ ) ) 4
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
172.66 ms | 408 KiB | 5 Q