3v4l.org

run code in 300+ PHP versions simultaneously
<?php $songs = [ ['title' => 'A Change Is Gonna Come'], ['title' => 'A Day In The Life'], ['title' => 'Be My Baby'], ['title' => 'Best Of My Love'], ['title' => 'Billie Jean'], ['title' => 'Bohemian Rhapsody'], ['title' => 'Born To Run'], ['title' => 'Bridge Over Troubled Water'], ['title' => 'Creep'], ['title' => 'Dancing In The Street'], ['title' => 'Dancing Queen'], ['title' => 'Every Breath You Take'], ['title' => 'Family Affair'], ['title' => 'Gimme Shelter'], ['title' => 'God Only Knows'], ['title' => 'God Save The Queen'], ['title' => 'Good Vibrations'], ['title' => 'Hallelujah'], ['title' => 'Heartbreak Hotel'], ['title' => 'Hey Jude'], ['title' => 'Hotel California'], ['title' => 'I Cant Get No Satisfaction'], ['title' => 'I Will Always Love You'], ['title' => 'Imagine'], ['title' => 'Jonny B Good'], ['title' => 'Life On Mars?'], ['title' => 'Like A Rolling Stone'], ['title' => 'Live Forever'], ['title' => 'London Calling'], ['title' => 'My Generation'], ['title' => 'No Woman No Cry'], ['title' => 'One'], ['title' => 'Over The Rainbow'], ['title' => 'Papas Got A Brand New Bag'], ['title' => 'Purple Haze'], ['title' => 'Respect'], ['title' => 'River Deep Mountain High'], ['title' => 'Smells Like Teen Spirit'], ['title' => 'Stairway To Heaven'], ['title' => 'Stand By Me'], ['title' => 'Sultans Of Swing'], ['title' => 'Sweet Child O Mine'], ['title' => 'The Twist'], ['title' => 'Waterloo Sunset'], ['title' => 'Whatd I Say'], ['title' => 'Whats Goin On'], ['title' => 'When Doves Cry'], ['title' => 'Yesterday'], ['title' => 'Your Song'], ['title' => 'Youve Lost That Lovin Feeling'], ]; // Group the songs by initial letter: $grouped = []; foreach($songs as $song) { $initial = $song['title'][0]; $grouped[$initial][] = $song; } // Divide into two sections (as number of alphabets / 2): list($left, $right) = array_chunk($grouped, ceil(count($grouped) / 2), true); // Function to output column: function print_songs(array $songs) { $html = ''; foreach($songs as $letter => $songsByLetter) { $html .= "\n" . $letter . "\n"; foreach($songsByLetter as $song) { $html .= $song['title'] . "\n"; } } return $html; } $left_column = print_songs($left); $right_column = print_songs($right); echo <<<SONGS -------- {$left_column} -------- {$right_column} -------- SONGS;

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.120.0120.00818.70
8.4.110.0030.00520.58
8.4.100.0110.00917.81
8.4.90.0110.01120.47
8.4.80.0130.00717.80
8.4.70.0130.00917.74
8.4.60.0110.01018.95
8.4.50.0080.00318.74
8.4.40.0070.01319.43
8.4.30.0080.01120.54
8.4.20.0120.00917.80
8.4.10.0040.01220.52
8.3.250.0120.00718.20
8.3.240.0060.01116.41
8.3.230.0110.00916.97
8.3.220.0100.00920.72
8.3.210.0070.00116.59
8.3.200.0050.00416.44
8.3.190.0080.00917.20
8.3.180.0100.00817.08
8.3.170.0070.00720.88
8.3.160.0150.00417.48
8.3.150.0160.00317.54
8.3.140.0160.00317.02
8.3.130.0070.00318.32
8.3.120.0050.00320.71
8.3.110.0060.00320.94
8.3.100.0040.00416.87
8.3.90.0080.00026.77
8.3.80.0040.00416.63
8.3.70.0080.00816.58
8.3.60.0150.00316.63
8.3.50.0140.00718.54
8.3.40.0090.00619.36
8.3.30.0070.00719.02
8.3.20.0070.00724.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0150.00317.32
8.2.280.0040.00318.21
8.2.270.0120.00617.02
8.2.260.0110.00716.86
8.2.250.0130.00716.80
8.2.240.0080.00817.21
8.2.230.0100.00022.58
8.2.220.0030.00624.06
8.2.210.0070.00726.77
8.2.200.0090.00018.54
8.2.190.0150.00018.16
8.2.180.0120.00625.92
8.2.170.0070.00718.91
8.2.160.0100.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0070.00020.89
8.2.110.0090.00021.00
8.2.100.0060.00617.80
8.2.90.0040.00418.03
8.2.80.0000.00818.78
8.2.70.0040.00417.93
8.2.60.0080.00017.63
8.2.50.0030.00617.98
8.2.40.0000.00718.34
8.2.30.0040.00418.16
8.2.20.0070.00020.55
8.2.10.0050.00318.13
8.2.00.0000.01219.31
8.1.330.0120.00816.34
8.1.320.0070.01216.11
8.1.310.0070.01116.96
8.1.300.0160.00316.23
8.1.290.0040.00430.84
8.1.280.0060.00925.92
8.1.270.0070.00023.99
8.1.260.0070.01126.35
8.1.250.0000.00828.09
8.1.240.0050.00522.30
8.1.230.0040.00820.99
8.1.220.0080.00017.80
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0030.00719.02
8.1.150.0040.00418.67
8.1.140.0040.00417.40
8.1.130.0030.00618.91
8.1.120.0020.00517.55
8.1.110.0000.00717.48
8.1.100.0000.00717.54
8.1.90.0040.00417.56
8.1.80.0030.00617.52
8.1.70.0030.00517.56
8.1.60.0040.00417.66
8.1.50.0030.00617.62
8.1.40.0060.00317.64
8.1.30.0050.00317.70
8.1.20.0000.00817.73
8.1.10.0130.00317.51
8.1.00.0180.00717.58
8.0.300.0000.00818.84
8.0.290.0050.00317.00
8.0.280.0070.00018.54
8.0.270.0030.00316.96
8.0.260.0040.00418.53
8.0.250.0070.00017.09
8.0.240.0000.00817.07
8.0.230.0070.00017.01
8.0.220.0000.00817.07
8.0.210.0030.00316.95
8.0.200.0030.00316.96
8.0.190.0080.00016.99
8.0.180.0040.00416.99
8.0.170.0100.00317.07
8.0.160.0070.00417.02
8.0.150.0070.00416.93
8.0.140.0060.00616.94
8.0.130.0070.00516.84
8.0.120.0120.00016.98
8.0.110.0120.00016.98
8.0.100.0090.00616.86
8.0.90.0120.00817.08
8.0.80.0170.00317.00
8.0.70.0220.00017.02
8.0.60.0120.00816.95
8.0.50.0140.00717.05
8.0.30.0130.00816.93
8.0.20.0120.00817.02
8.0.10.0160.00417.08
7.4.330.0020.00215.55
7.4.320.0060.00016.53
7.4.300.0060.00316.60
7.4.290.0030.00316.40
7.4.280.0170.00416.66
7.4.270.0090.01316.68
7.4.260.0180.00416.58
7.4.250.0060.01716.53
7.4.240.0210.00016.58
7.4.230.0130.00916.64
7.4.220.0140.00516.71
7.4.210.0150.00416.65
7.4.200.0180.00416.56
7.4.190.0080.01216.66
7.4.180.0180.00316.68
7.4.160.0000.01216.61
7.4.150.0030.01116.55
7.4.140.0050.00316.43
7.4.130.0040.00416.49
7.4.120.0040.00816.42
7.4.110.0160.00516.56
7.4.100.0170.00416.59
7.4.90.0160.00316.57
7.4.80.0160.00416.48
7.4.70.0170.00916.48
7.4.60.0250.00316.43
7.4.50.0180.00016.41
7.4.40.0160.00316.45
7.4.30.0160.00316.50
7.4.20.0120.00616.48
7.4.10.0210.00016.44
7.4.00.0170.00316.38

preferences:
34.79 ms | 403 KiB | 5 Q