3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'KeyAccountID' => 1234, 'KeyAccountName' => 'John, Lennon', 'ClientID' => 9999, 'Client' => 'BBC', 'projects' => [ [2,915,'Zyxeldy','','',15000,'','',''], [2,956,'Awesome project, Step 1 ','','',1833.3333,1833.3333,1833.3333,''], [2,957,'Awesome project, Step 2','','',7000,'','',''] ] ],[ 'KeyAccountID' => 1236, 'KeyAccountName' => 'Ringo Starr', 'ClientID' => 9997, 'Client' => 'XYY', 'projects' => [ [2,867,'Data Mining','','',10000,'','',''] ] ],[ 'KeyAccountID' => 1235, 'KeyAccountName' => 'Poul McCartney', 'ClientID' => 9996, 'Client' => 'XYZ', 'projects' => [ [2,715,'XYZ, CSM','','',22083.3333,22083.3333,22083.3333,''] ] ] ]; $newArray = []; foreach($array as $value) { $newArray[$value['KeyAccountID']]['month1'] = array_sum(array_column($value['projects'],5)); $newArray[$value['KeyAccountID']]['month2'] = array_sum(array_column($value['projects'],6)); $newArray[$value['KeyAccountID']]['month3'] = array_sum(array_column($value['projects'],7)); } echo "<pre>"; var_dump($newArray); ?>

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.0110.00920.73
8.4.110.0090.00322.27
8.4.100.0110.00618.06
8.4.90.0060.00318.88
8.4.80.0110.01019.84
8.4.70.0150.00118.18
8.4.60.0130.00718.64
8.4.50.0110.00618.74
8.4.40.0070.01019.46
8.4.30.0060.00922.56
8.4.20.0030.00618.89
8.4.10.0130.00322.61
8.3.250.0120.00619.08
8.3.240.0130.00616.55
8.3.230.0110.00816.79
8.3.220.0100.00817.13
8.3.210.0100.00818.53
8.3.200.0060.00416.84
8.3.190.0120.00717.13
8.3.180.0090.01018.72
8.3.170.0070.01417.14
8.3.160.0070.00018.63
8.3.150.0120.00618.72
8.3.140.0150.00417.25
8.3.130.0040.00416.79
8.3.120.0000.00918.96
8.3.110.0030.01320.94
8.3.100.0060.01016.73
8.3.90.0100.01016.75
8.3.80.0060.00318.43
8.3.70.0060.01218.81
8.3.60.0070.00716.61
8.3.50.0060.00718.45
8.3.40.0120.00418.79
8.3.30.0040.01118.83
8.3.20.0040.00421.95
8.3.10.0000.00721.92
8.3.00.0080.00022.40
8.2.290.0120.00620.74
8.2.280.0090.00918.53
8.2.270.0100.00318.82
8.2.260.0040.00416.72
8.2.250.0160.00318.60
8.2.240.0030.00617.49
8.2.230.0030.00622.58
8.2.220.0060.00324.06
8.2.210.0040.00426.77
8.2.200.0080.00418.41
8.2.190.0090.00918.16
8.2.180.0130.00618.29
8.2.170.0000.01422.96
8.2.160.0140.00320.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00719.66
8.2.110.0090.00020.51
8.2.100.0000.01218.03
8.2.90.0040.00418.03
8.2.80.0080.00017.97
8.2.70.0040.00417.80
8.2.60.0060.00318.34
8.2.50.0040.00418.10
8.2.40.0080.00021.20
8.2.30.0030.00619.34
8.2.20.0040.00418.20
8.2.10.0030.00519.33
8.2.00.0000.00719.20
8.1.330.0150.00421.95
8.1.320.0160.00316.31
8.1.310.0060.00318.23
8.1.300.0040.00416.86
8.1.290.0060.00318.88
8.1.280.0170.00025.92
8.1.270.0040.00420.51
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0060.00320.64
8.1.230.0080.00422.67
8.1.220.0080.00017.76
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0090.00017.13
8.1.180.0050.00318.10
8.1.170.0030.00618.64
8.1.160.0040.00418.96
8.1.150.0070.00018.80
8.1.140.0040.00419.02
8.1.130.0090.00020.13
8.1.120.0030.00617.46
8.1.110.0070.00017.47
8.1.100.0000.00817.52
8.1.90.0000.00917.37
8.1.80.0040.00417.38
8.1.70.0000.00717.47
8.1.60.0030.00617.62
8.1.50.0000.00717.52
8.1.40.0040.00417.49
8.1.30.0060.00317.63
8.1.20.0040.00417.63
8.1.10.0040.00417.49
8.1.00.0060.00317.53
8.0.300.0060.00320.03
8.0.290.0080.00016.63
8.0.280.0040.00418.33
8.0.270.0000.00717.19
8.0.260.0000.00720.08
8.0.250.0000.00716.99
8.0.240.0000.00716.85
8.0.230.0040.00416.83
8.0.220.0000.00716.92
8.0.210.0000.00716.83
8.0.200.0000.00716.88
8.0.190.0000.00816.88
8.0.180.0040.00416.88
8.0.170.0030.00616.91
8.0.160.0050.00316.92
8.0.150.0040.00416.89
8.0.140.0070.00016.84
8.0.130.0050.00313.30
8.0.120.0050.00216.76
8.0.110.0000.00716.85
8.0.100.0030.00516.96
8.0.90.0090.00016.77
8.0.80.0060.00916.85
8.0.70.0030.00516.91
8.0.60.0070.00016.92
8.0.50.0040.00416.94
8.0.30.0120.00916.86
8.0.20.0160.00317.14
8.0.10.0080.00017.05
8.0.00.0140.00716.91
7.4.330.0050.00015.55
7.4.320.0060.00016.62
7.4.300.0000.00716.60
7.4.290.0030.00316.49
7.4.280.0040.00416.62
7.4.270.0070.00016.52
7.4.260.0000.00613.35
7.4.250.0000.00816.49
7.4.240.0020.00616.54
7.4.230.0070.00016.59
7.4.220.0050.00216.60
7.4.210.0040.01116.56
7.4.200.0000.00716.54
7.4.130.0140.00416.77
7.4.120.0090.01516.48
7.4.110.0030.01316.73
7.4.100.0110.00916.60
7.4.90.0070.01016.52
7.4.80.0100.01019.39
7.4.70.0120.00916.52
7.4.60.0060.01216.51
7.4.50.0130.00016.36
7.4.40.0120.00616.43
7.4.00.0070.00815.01
7.3.330.0000.00816.39
7.3.320.0000.00513.21
7.3.310.0040.00416.43
7.3.300.0000.00716.25
7.3.290.0000.00616.24
7.3.280.0140.00716.31
7.3.260.0130.00816.46
7.3.230.0140.00316.32
7.3.210.0030.01416.34
7.3.200.0090.00916.57
7.3.190.0080.01416.40
7.3.180.0100.00916.61
7.3.170.0140.00716.25
7.3.160.0050.01116.50
7.3.120.0120.00315.03
7.3.110.0110.00714.85
7.3.100.0050.01014.89
7.3.90.0090.00414.75
7.3.80.0060.00714.84
7.3.70.0030.00914.74
7.3.60.0050.01114.89
7.3.50.0060.01114.77
7.3.40.0060.00814.73
7.3.30.0020.01014.76
7.3.20.0090.00615.77
7.3.10.0010.01115.90
7.3.00.0090.00715.68
7.2.330.0090.00916.53
7.2.320.0060.01616.59
7.2.310.0140.00316.50
7.2.300.0150.00316.71
7.2.290.0060.01116.80
7.2.250.0060.01215.26
7.2.240.0060.01314.79
7.2.230.0060.01215.01
7.2.220.0020.01015.11
7.2.210.0060.00515.18
7.2.200.0050.00715.01
7.2.190.0070.00915.17
7.2.180.0110.00614.97
7.2.170.0060.00814.86
7.2.160.0030.01115.06
7.2.150.0060.00914.88
7.2.140.0120.00414.89
7.2.130.0130.00415.15
7.2.120.0120.00714.99
7.2.110.0030.01715.07
7.2.100.0110.00615.07
7.2.90.0090.00915.25
7.2.80.0090.00615.13
7.2.70.0050.01115.20
7.2.60.0080.00815.20
7.2.50.0050.01015.18
7.2.40.0040.01515.30
7.2.30.0100.00515.26
7.2.20.0030.01415.20
7.2.10.0070.00715.16
7.2.00.0100.00514.96
7.1.330.0110.00514.95
7.1.320.0100.00314.95
7.1.310.0090.00314.92
7.1.300.0090.00714.99
7.1.290.0060.00814.83
7.1.280.0100.00515.02
7.1.270.0070.00714.89
7.1.260.0060.01114.66
7.1.250.0130.00314.19

preferences:
29.05 ms | 403 KiB | 5 Q