3v4l.org

run code in 500+ PHP versions simultaneously
<?php $getAllRound = [ [ 'player_name' => 'AC', 'round' => 1, 'winlose' => 10, 'game_title' => 'First', ], [ 'player_name' => 'M3', 'round' => 1, 'winlose' => -50, 'game_title' => 'First', ], [ 'player_name' => 'M2', 'round' => 2, 'winlose' => -50, 'game_title' => 'Second', ], [ 'player_name' => 'M1', 'round' => 2, 'winlose' => -150, 'game_title' => 'Second', ], [ 'player_name' => 'M5', 'round' => 2, 'winlose' => -50, 'game_title' => 'First', ], [ 'player_name' => 'M7', 'round' => 2, 'winlose' => 50, 'game_title' => 'Second', ], ]; $roundsExist = array(); $outputArray = array(); foreach($getAllRound as $playerRound){ if(!in_array($playerRound['round'], $roundsExist)){ $roundsExist[] = $playerRound['round']; $outputArray[$playerRound['round']]['round'] = array( 'round' => $playerRound['round'], 'positive' => 0, 'negative' => 0, 'total' => 0 ); if($playerRound['winlose'] <= 0){ $outputArray[$playerRound['round']]['round']['negative'] += $playerRound['winlose']; }else{ $outputArray[$playerRound['round']]['round']['positive'] += $playerRound['winlose']; } $outputArray[$playerRound['round']]['round']['total'] += $playerRound['winlose']; } } print_r($outputArray);

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.5.70.0090.00816.86
8.5.60.0110.00716.86
8.5.50.0120.00516.81
8.5.30.0080.01020.18
8.5.20.0090.00820.27
8.5.10.0050.00418.76
8.5.00.0140.00920.03
8.4.210.0140.00719.59
8.4.180.0120.00922.02
8.4.170.0120.00922.21
8.4.160.0130.00823.89
8.4.150.0080.00416.96
8.4.140.0140.00817.64
8.4.130.0070.00417.61
8.4.120.0130.00522.35
8.4.110.0110.00822.55
8.4.100.0130.00817.86
8.4.90.0150.00617.56
8.4.80.0040.00619.40
8.4.70.0140.00617.81
8.4.60.0130.00718.94
8.4.50.0140.00520.63
8.4.40.0070.01317.36
8.4.30.0060.01320.29
8.4.20.0160.00319.69
8.4.10.0090.00019.53
8.3.300.0110.00920.59
8.3.290.0130.00620.88
8.3.280.0130.01018.60
8.3.270.0110.00816.66
8.3.260.0150.00516.74
8.3.250.0130.00619.02
8.3.240.0160.00316.76
8.3.230.0110.00816.39
8.3.220.0050.00317.08
8.3.210.0090.01016.62
8.3.200.0040.00516.70
8.3.190.0130.00617.17
8.3.180.0050.00318.59
8.3.170.0050.00318.46
8.3.160.0040.01516.63
8.3.150.0040.00417.21
8.3.140.0070.00718.98
8.3.130.0030.00518.57
8.3.120.0090.00020.63
8.3.110.0080.00820.94
8.3.100.0060.00324.06
8.3.90.0030.00626.77
8.3.80.0090.00316.63
8.3.70.0090.00618.43
8.3.60.0040.01116.50
8.3.50.0090.00920.15
8.3.40.0070.00720.38
8.3.30.0180.00019.10
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.300.0170.00817.90
8.2.290.0060.00420.65
8.2.280.0060.00318.46
8.2.270.0120.00616.71
8.2.260.0140.00317.09
8.2.250.0100.00018.59
8.2.240.0000.00817.21
8.2.230.0050.00322.58
8.2.220.0090.00037.54
8.2.210.0000.00826.77
8.2.200.0030.00616.63
8.2.190.0060.00916.58
8.2.180.0090.00925.92
8.2.170.0030.01418.91
8.2.160.0110.00422.96
8.2.150.0080.00025.66
8.2.140.0050.00224.66
8.2.130.0000.00826.16
8.2.120.0050.00319.36
8.2.110.0060.00322.27
8.2.100.0070.00317.97
8.2.90.0090.00019.34
8.2.80.0050.00318.16
8.2.70.0100.00017.47
8.2.60.0040.00418.04
8.2.50.0000.00818.07
8.2.40.0000.00817.63
8.2.30.0040.00418.08
8.2.20.0070.00020.59
8.2.10.0030.00717.65
8.2.00.0040.00419.32
8.1.340.0140.00817.61
8.1.330.0070.01216.53
8.1.320.0070.00315.93
8.1.310.0000.00717.02
8.1.300.0090.00017.89
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0060.00323.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0110.00018.97
8.1.220.0050.00317.74
8.1.210.0070.00318.77
8.1.200.0040.00417.35
8.1.190.0040.00417.43
8.1.180.0000.00818.10
8.1.170.0050.00318.50
8.1.160.0000.00718.90
8.1.150.0040.00418.66
8.1.140.0000.00817.40
8.1.130.0030.00318.78
8.1.120.0040.00417.55
8.1.110.0050.00317.43
8.1.100.0040.00417.39
8.1.90.0000.00717.41
8.1.80.0080.00017.42
8.1.70.0030.00617.44
8.1.60.0060.00317.58
8.1.50.0090.00017.59
8.1.40.0060.00317.48
8.1.30.0030.00617.61
8.1.20.0220.00417.57
8.1.10.0240.00317.49
8.1.00.0220.00417.34
8.0.300.0070.00018.77
8.0.290.0080.00017.16
8.0.280.0030.00318.52
8.0.270.0000.00816.81
8.0.260.0000.00818.47
8.0.250.0000.00816.95
8.0.240.0040.00416.95
8.0.230.0070.00017.00
8.0.220.0000.00716.95
8.0.210.0040.00416.76
8.0.200.0030.00317.00
8.0.190.0040.00416.82
8.0.180.0040.00416.96
8.0.170.0030.00616.82
8.0.160.0150.00616.98
8.0.150.0140.00716.87
8.0.140.0160.00316.62
8.0.130.0200.00316.84
8.0.120.0170.00916.91
8.0.110.0130.00916.91
8.0.100.0190.00416.73
8.0.90.0170.00716.92
8.0.80.0080.00816.87
8.0.70.0040.00416.81
8.0.60.0030.00616.93
8.0.50.0040.00416.98
8.0.30.0030.00516.93
8.0.20.0040.00416.91
8.0.10.0040.00417.00
7.4.330.0020.00215.55
7.4.320.0040.00416.64
7.4.300.0000.00616.39
7.4.290.0040.00416.45
7.4.280.0040.00416.54
7.4.270.0080.00016.54
7.4.260.0130.00416.62
7.4.250.0150.00716.64
7.4.240.0130.00716.61
7.4.230.0050.00516.61
7.4.220.0130.00316.63
7.4.210.0090.00916.53
7.4.200.0210.00016.39
7.4.190.0160.00316.54
7.4.180.0090.00916.71
7.4.160.0150.00416.56
7.4.150.0190.00016.54
7.4.140.0130.00616.41
7.4.130.0160.00316.53
7.4.120.0160.00316.47
7.4.110.0160.00316.49
7.4.100.0130.00616.58
7.4.90.0140.00816.59
7.4.80.0240.00316.31
7.4.70.0210.00016.41
7.4.60.0160.00316.32
7.4.50.0150.00816.34
7.4.40.0150.00616.36
7.4.30.0150.00416.53
7.4.20.0130.00416.61
7.4.10.0090.00916.48
7.4.00.0110.00216.59

preferences:
98.16 ms | 1358 KiB | 5 Q