3v4l.org

run code in 300+ PHP versions simultaneously
<?php $costiCategorie = json_decode('[{"nomeCategoria":"Edilizia","costoCategoria":"350000"}, {"nomeCategoria":"Ingegneria","costoCategoria":"234000"}, {"nomeCategoria":"Ingegneria","costoCategoria":"275000"}, {"nomeCategoria":"Edilizia","costoCategoria":"328000"}]',true); $totCostiEdilizia = array(); foreach ($costiCategorie as $singleCostiCategorie) { $totCostiEdilizia[$singleCostiCategorie["nomeCategoria"]][] =$singleCostiCategorie["costoCategoria"]; } var_dump($totCostiEdilizia); echo "Costi totali Edilizia = " . array_sum($totCostiEdilizia["Edilizia"]) . "\n"; echo "Costi totali Ingegneria = " . array_sum($totCostiEdilizia["Ingegneria"]) . "\n";

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.140.0110.01117.53
8.4.130.0090.01218.81
8.4.120.0060.00324.05
8.4.110.0120.01023.85
8.4.100.0110.01019.44
8.4.90.0130.00818.68
8.4.80.0170.00517.59
8.4.70.0090.00717.89
8.4.60.0040.00518.58
8.4.50.0120.00720.32
8.4.40.0070.01319.28
8.4.30.0090.01224.25
8.4.20.0140.00720.77
8.4.10.0040.00817.75
8.3.270.0100.01016.53
8.3.260.0060.00316.82
8.3.250.0090.00918.86
8.3.240.0120.00817.16
8.3.230.0150.00516.50
8.3.220.0100.00717.34
8.3.210.0090.00916.59
8.3.200.0050.00516.58
8.3.190.0120.00817.15
8.3.180.0090.00916.72
8.3.170.0080.00017.24
8.3.160.0140.00420.36
8.3.150.0160.00318.88
8.3.140.0040.00416.99
8.3.130.0060.00316.71
8.3.120.0060.00320.81
8.3.110.0040.00416.50
8.3.100.0040.00418.31
8.3.90.0120.00618.43
8.3.80.0090.00018.53
8.3.70.0080.01216.38
8.3.60.0150.00618.31
8.3.50.0090.00921.28
8.3.40.0140.00418.88
8.3.30.0120.00318.72
8.3.20.0040.00421.90
8.3.10.0040.00422.14
8.3.00.0000.00823.53
8.2.290.0090.00720.44
8.2.280.0110.00718.74
8.2.270.0130.00717.59
8.2.260.0090.00917.08
8.2.250.0030.01216.63
8.2.240.0120.00617.41
8.2.230.0050.00320.94
8.2.220.0060.00324.06
8.2.210.0120.00326.77
8.2.200.0100.00316.38
8.2.190.0170.00016.75
8.2.180.0060.00916.50
8.2.170.0070.00722.96
8.2.160.0130.00022.04
8.2.150.0090.00024.18
8.2.140.0030.00524.66
8.2.130.0030.00626.16
8.2.120.0000.00726.16
8.2.110.0060.00319.27
8.2.100.0110.00017.91
8.2.90.0000.00817.91
8.2.80.0000.00818.05
8.2.70.0040.00818.05
8.2.60.0030.00618.22
8.2.50.0090.00018.10
8.2.40.0050.00319.43
8.2.30.0030.00519.40
8.2.20.0070.00018.18
8.2.10.0000.00719.36
8.2.00.0000.00720.69
8.1.330.0140.00521.86
8.1.320.0110.00916.23
8.1.310.0040.00418.29
8.1.300.0060.00318.48
8.1.290.0030.00619.79
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00322.54
8.1.230.0000.01220.75
8.1.220.0090.00017.76
8.1.210.0050.00320.19
8.1.200.0000.01017.35
8.1.190.0000.00917.23
8.1.180.0040.00418.10
8.1.170.0040.00418.66
8.1.160.0040.00418.92
8.1.150.0040.00418.82
8.1.140.0070.00022.20
8.1.130.0000.00720.22
8.1.120.0000.00717.36
8.1.110.0050.00317.48
8.1.100.0040.00417.36
8.1.90.0020.00517.37
8.1.80.0040.00417.42
8.1.70.0030.00317.45
8.1.60.0040.00417.66
8.1.50.0050.00317.42
8.1.40.0040.00417.54
8.1.30.0030.00517.61
8.1.20.0030.00617.61
8.1.10.0060.00317.61
8.1.00.0040.00417.55
8.0.300.0040.00420.07
8.0.290.0000.00816.75
8.0.280.0030.00318.40
8.0.270.0070.00017.30
8.0.260.0030.00620.10
8.0.250.0030.00316.98
8.0.240.0070.00016.85
8.0.230.0000.00717.03
8.0.220.0000.00816.87
8.0.210.0000.00616.77
8.0.200.0000.00717.01
8.0.190.0030.00616.99
8.0.180.0000.00716.93
8.0.170.0030.00716.96
8.0.160.0000.00916.89
8.0.150.0040.00416.82
8.0.140.0000.00916.75
8.0.130.0060.00013.32
8.0.120.0040.00516.83
8.0.110.0050.00216.89
8.0.100.0000.00716.82
8.0.90.0060.00316.92
8.0.80.0130.00316.93
8.0.70.0020.00516.68
8.0.60.0040.00416.80
8.0.50.0000.00816.79
8.0.30.0070.01117.06
8.0.20.0090.00917.09
8.0.10.0000.00717.09
8.0.00.0130.00516.68
7.4.330.0030.00615.55
7.4.320.0050.00216.47
7.4.300.0070.00016.61
7.4.290.0030.00316.50
7.4.280.0040.00816.51
7.4.270.0070.00316.54
7.4.260.0080.00016.36
7.4.250.0000.00716.62
7.4.240.0050.00216.53
7.4.230.0030.00316.68
7.4.220.0030.00316.45
7.4.210.0080.00916.54
7.4.200.0000.00716.50
7.4.140.0070.01417.86
7.4.130.0170.00016.65
7.4.120.0090.00916.55
7.4.110.0100.00616.64
7.4.100.0080.01116.57
7.4.90.0140.00416.63
7.4.80.0030.01919.39
7.4.70.0070.01416.54
7.4.60.0090.00616.51
7.4.50.0000.01716.56
7.4.40.0070.01016.50
7.4.00.0000.01614.92
7.3.330.0030.00313.24
7.3.320.0030.00313.11
7.3.310.0030.00316.23
7.3.300.0030.00316.32
7.3.290.0050.00316.32
7.3.280.0060.00916.35
7.3.260.0080.01016.44
7.3.240.0130.00616.50
7.3.230.0090.01216.57
7.3.210.0100.00716.42
7.3.200.0110.01116.55
7.3.190.0080.00816.54
7.3.180.0100.01016.33
7.3.170.0140.00316.61
7.3.160.0070.01416.52
7.3.70.0030.01414.97
7.3.60.0120.00915.02
7.3.50.0060.00614.93
7.3.40.0030.00814.77
7.3.30.0040.00814.89
7.3.20.0090.00916.52
7.3.10.0100.00516.66
7.3.00.0090.00616.53
7.2.330.0070.01016.38
7.2.320.0080.00916.74
7.2.310.0100.00616.85
7.2.300.0110.01416.76
7.2.290.0110.01216.79
7.2.200.0030.00915.14
7.2.190.0130.00015.07
7.2.180.0070.01714.91
7.2.170.0110.00315.17
7.2.160.0110.00514.87
7.2.150.0080.00817.00
7.2.140.0050.01016.80
7.2.130.0120.00617.09
7.2.120.0090.00617.08
7.2.110.0110.00616.69
7.2.100.0250.00016.75
7.2.90.0100.00617.05
7.2.80.0100.00317.02
7.2.70.0080.00516.68
7.2.60.0060.01816.95
7.2.50.0130.00916.63
7.2.40.0060.01616.92
7.2.30.0050.00716.98
7.2.20.0030.00816.85
7.2.10.0090.01216.68
7.2.00.0180.00616.94
7.1.300.0090.01215.92
7.1.290.0080.00415.73
7.1.280.0090.00315.84
7.1.270.0030.00915.65
7.1.260.0070.00715.67
7.1.250.0090.00315.52

preferences:
34.46 ms | 403 KiB | 5 Q