3v4l.org

run code in 300+ PHP versions simultaneously
<?php $productos = array( array("id" => 10, "name"=>"bread"), array("id" => 12, "name"=>"Jam"), array("id" => 10, "name"=>"bread"), array("id" => 105, "name"=>"lobster") ); $cuenta = array(); foreach($productos as $producto){ if(!isset($cuenta[$producto['id']])){ $cuenta[$producto['id']] = 1; } else { $cuenta[$producto['id']]++; } } var_dump($cuenta);

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.3.60.0140.00718.55
8.3.50.0140.00222.10
8.3.40.0200.00018.98
8.3.30.0100.00318.84
8.3.20.0040.00418.65
8.3.10.0050.00520.97
8.3.00.0080.00019.68
8.2.180.0070.00718.17
8.2.170.0040.01122.96
8.2.160.0070.00720.53
8.2.150.0030.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00021.19
8.2.110.0070.00322.25
8.2.100.0060.00617.84
8.2.90.0000.00817.91
8.2.80.0080.00017.97
8.2.70.0030.00617.49
8.2.60.0030.00717.93
8.2.50.0030.00618.07
8.2.40.0040.00418.09
8.2.30.0000.00719.48
8.2.20.0040.00417.77
8.2.10.0040.00417.71
8.2.00.0120.00017.78
8.1.280.0110.00425.92
8.1.270.0060.00323.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00022.53
8.1.230.0040.00720.88
8.1.220.0050.00317.78
8.1.210.0080.00019.04
8.1.200.0060.00317.35
8.1.190.0030.00617.66
8.1.180.0030.00618.10
8.1.170.0060.00320.43
8.1.160.0040.00418.87
8.1.150.0000.00718.52
8.1.140.0000.00717.45
8.1.130.0030.00317.74
8.1.120.0040.00417.35
8.1.110.0000.00817.32
8.1.100.0000.00817.35
8.1.90.0000.00717.52
8.1.80.0000.00717.46
8.1.70.0000.00717.39
8.1.60.0030.00717.64
8.1.50.0000.00717.51
8.1.40.0030.00517.41
8.1.30.0040.00417.50
8.1.20.0040.00417.52
8.1.10.0120.00017.43
8.1.00.0030.00617.45
8.0.300.0080.00020.04
8.0.290.0060.00317.18
8.0.280.0030.00518.49
8.0.270.0030.00317.27
8.0.260.0030.00316.70
8.0.250.0000.00716.84
8.0.240.0060.00316.79
8.0.230.0000.00716.86
8.0.220.0000.00716.94
8.0.210.0000.00716.77
8.0.200.0000.00617.00
8.0.190.0040.00417.01
8.0.180.0000.00716.95
8.0.170.0070.00016.91
8.0.160.0030.00616.82
8.0.150.0030.00516.92
8.0.140.0080.00016.79
8.0.130.0060.00013.41
8.0.120.0000.00816.84
8.0.110.0040.00416.67
8.0.100.0090.00016.75
8.0.90.0040.00416.91
8.0.80.0090.00616.88
8.0.70.0000.00716.75
8.0.60.0040.00416.72
8.0.50.0040.00416.88
8.0.30.0120.00717.02
8.0.20.0100.00917.40
8.0.10.0030.00316.95
8.0.00.0080.01016.77
7.4.330.0000.00516.67
7.4.320.0030.00716.61
7.4.300.0030.00316.51
7.4.290.0070.00016.61
7.4.280.0060.00316.36
7.4.270.0070.00016.50
7.4.260.0020.00213.28
7.4.250.0040.00416.42
7.4.240.0070.00016.53
7.4.230.0080.00016.30
7.4.220.0030.01516.45
7.4.210.0060.01016.58
7.4.200.0000.00716.49
7.4.190.0040.00416.56
7.4.160.0110.00716.54
7.4.150.0090.00917.40
7.4.140.0110.01117.86
7.4.130.0090.01016.48
7.4.120.0060.01116.42
7.4.110.0070.01016.45
7.4.100.0140.00916.45
7.4.90.0060.01016.53
7.4.80.0150.00419.39
7.4.70.0070.01216.60
7.4.60.0140.00916.56
7.4.50.0060.00316.63
7.4.40.0100.00622.77
7.4.30.0090.01316.52
7.4.00.0060.01215.09
7.3.330.0030.00313.20
7.3.320.0000.00513.18
7.3.310.0000.00716.18
7.3.300.0000.00616.11
7.3.290.0060.01216.30
7.3.280.0080.01016.29
7.3.270.0100.01017.40
7.3.260.0070.01318.24
7.3.250.0110.00816.48
7.3.240.0070.01016.55
7.3.230.0170.00616.60
7.3.210.0080.00816.36
7.3.200.0070.01019.39
7.3.190.0060.01116.33
7.3.180.0120.00416.52
7.3.170.0090.00616.43
7.3.160.0070.01016.55
7.3.120.0060.00914.81
7.3.110.0070.01014.84
7.3.100.0040.00714.82
7.3.90.0000.01714.82
7.3.80.0080.00814.79
7.3.70.0070.00714.92
7.3.60.0050.00914.94
7.3.50.0060.00914.82
7.3.40.0000.01314.66
7.3.30.0090.00614.91
7.3.20.0080.00316.72
7.3.10.0090.00516.59
7.3.00.0080.00616.75
7.2.330.0110.00616.58
7.2.320.0140.00316.57
7.2.310.0100.00716.43
7.2.300.0060.01316.68
7.2.290.0090.00616.69
7.2.240.0140.00414.85
7.2.230.0030.01314.84
7.2.220.0070.01115.05
7.2.210.0000.01014.87
7.2.200.0000.01015.09
7.2.190.0000.01514.88
7.2.180.0040.00814.78
7.2.170.0060.00614.79
7.2.160.0030.01315.09
7.2.150.0120.00616.87
7.2.140.0100.00716.87
7.2.130.0060.00616.79
7.2.120.0060.00817.02
7.2.110.0080.00516.99
7.2.100.0060.00716.69
7.2.90.0050.01017.03
7.2.80.0060.00816.91
7.2.70.0050.00616.81
7.2.60.0060.00816.89
7.2.50.0050.00916.92
7.2.40.0050.00816.96
7.2.30.0020.01217.04
7.2.20.0050.00716.77
7.2.10.0060.00716.91
7.2.00.0040.00917.58
7.1.330.0000.01215.84
7.1.320.0030.00615.73
7.1.310.0030.01015.70
7.1.300.0100.00315.86
7.1.290.0060.00615.86
7.1.280.0080.00815.67
7.1.270.0070.00716.00
7.1.260.0070.00315.66
7.1.250.0020.01115.67
7.1.100.0030.01618.27
7.1.70.0060.00317.08
7.1.60.0060.01317.29
7.1.50.0140.00016.92
7.1.40.0080.00816.64
7.1.30.0040.00816.74
7.1.20.0000.01316.89
7.1.10.0040.00416.69
7.1.00.0000.01316.71
7.0.200.0060.00316.46
7.0.190.0000.01016.88
7.0.180.0000.00716.12
7.0.170.0040.00416.40
7.0.160.0000.00716.32
7.0.150.0060.00916.27
7.0.140.0050.00216.32
7.0.130.0030.00616.46
7.0.120.0060.00916.68
7.0.110.0050.00316.26
7.0.100.0000.00816.54
7.0.90.0030.00516.20
7.0.80.0000.00916.30
7.0.70.0060.00316.24
7.0.60.0000.00715.88
7.0.50.0000.00716.46
7.0.40.0000.01114.86
7.0.30.0000.01214.86
7.0.20.0000.00814.86
7.0.10.0030.00514.86
7.0.00.0000.00814.86
5.6.300.0060.05520.90
5.6.290.0100.04320.79
5.6.280.0070.08321.10
5.6.270.0030.08620.86
5.6.260.0030.05320.96
5.6.250.0070.03821.05
5.6.240.0000.04620.89
5.6.230.0160.03220.80
5.6.220.0000.04520.95
5.6.210.0030.04420.60
5.6.200.0070.04320.94
5.6.190.0030.04120.92
5.6.180.0000.04320.82
5.6.170.0030.04120.85
5.6.160.0000.04420.83
5.6.150.0060.03820.98
5.6.140.0030.04421.04
5.6.130.0000.04420.94
5.6.120.0000.04820.97
5.6.110.0060.04120.81
5.6.100.0000.05121.01
5.6.90.0100.03620.75
5.6.80.0030.03820.21
5.6.70.0100.04420.19
5.6.60.0100.03320.40
5.6.50.0030.04020.40
5.6.40.0030.04720.31
5.6.30.0000.04520.34
5.6.20.0000.05020.11
5.6.10.0030.03720.18
5.6.00.0040.04320.17
5.5.380.0030.04317.57
5.5.370.0030.04517.49
5.5.360.0040.04217.45
5.5.350.0000.04317.55
5.5.340.0000.05718.04
5.5.330.0030.08418.02
5.5.320.0000.04717.97
5.5.310.0000.05117.96
5.5.300.0200.04018.02
5.5.290.0070.04718.03
5.5.280.0140.04517.86
5.5.270.0000.04518.02
5.5.260.0140.04217.96
5.5.250.0170.05117.77
5.5.240.0000.04417.41
5.5.230.0000.04817.39
5.5.220.0000.03917.41
5.5.210.0070.03517.36
5.5.200.0000.04117.39
5.5.190.0100.03817.33
5.5.180.0030.04217.47
5.5.160.0000.04917.33
5.5.150.0030.03817.18
5.5.140.0030.05917.46
5.5.130.0000.04317.05
5.5.120.0090.03117.34
5.5.110.0030.05017.29
5.5.100.0000.08417.29
5.5.90.0070.06617.21
5.5.80.0140.03417.30
5.5.70.0030.03817.31
5.5.60.0030.08117.27
5.5.50.0030.03816.95
5.5.40.0000.07317.31
5.5.30.0000.08317.20
5.5.20.0000.05517.27
5.5.10.0060.04217.27
5.5.00.0070.03817.28
5.4.450.0070.04019.20
5.4.440.0030.04119.32
5.4.430.0030.03819.22
5.4.420.0000.04719.30
5.4.410.0040.03919.19
5.4.400.0030.04118.78
5.4.390.0000.04618.84
5.4.380.0030.05419.00
5.4.370.0000.04518.94
5.4.360.0000.04119.04
5.4.350.0030.03619.01
5.4.340.0030.04018.98
5.4.320.0000.04619.04
5.4.310.0030.03618.92
5.4.300.0100.05619.03
5.4.290.0030.05918.96
5.4.280.0000.04119.04
5.4.270.0000.03918.98
5.4.260.0070.06319.07
5.4.250.0170.03718.77
5.4.240.0030.05619.10
5.4.230.0100.06218.93
5.4.220.0100.04319.07
5.4.210.0000.07918.92
5.4.200.0030.07918.93
5.4.190.0030.07818.77
5.4.180.0030.05118.82
5.4.170.0000.04118.79
5.4.160.0070.03418.98
5.4.150.0000.04318.96
5.4.140.0000.04916.55
5.4.130.0070.03116.68
5.4.120.0000.04116.46
5.4.110.0070.03316.39
5.4.100.0030.03316.36
5.4.90.0030.03416.62
5.4.80.0000.04116.55
5.4.70.0060.04216.61
5.4.60.0070.03316.52
5.4.50.0070.03016.38
5.4.40.0030.03916.59
5.4.30.0030.03716.27
5.4.20.0030.03416.47
5.4.10.0070.05016.53
5.4.00.0030.03715.92
5.3.290.0000.04414.86
5.3.280.0030.07014.86
5.3.270.0060.03414.86
5.3.260.0060.03814.86
5.3.250.0000.04514.86
5.3.240.0000.04114.86
5.3.230.0030.03714.86
5.3.220.0000.03814.86
5.3.210.0000.03914.86
5.3.200.0000.04614.86
5.3.190.0030.04114.86
5.3.180.0070.04214.86
5.3.170.0030.03714.86
5.3.160.0000.04214.86
5.3.150.0030.03914.86
5.3.140.0070.03714.86
5.3.130.0030.04214.86
5.3.120.0030.03714.86
5.3.110.0030.06914.86
5.3.100.0060.05214.86
5.3.90.0070.03114.86
5.3.80.0030.03414.86
5.3.70.0000.04014.86
5.3.60.0000.05614.86
5.3.50.0070.06914.86
5.3.40.0030.07614.86
5.3.30.0030.07914.86
5.3.20.0000.03514.86
5.3.10.0000.03614.86
5.3.00.0070.04014.86
5.2.170.0030.05414.86
5.2.160.0030.03314.86
5.2.150.0000.07814.86
5.2.140.0000.03814.86
5.2.130.0000.03514.86
5.2.120.0000.03414.86
5.2.110.0030.04114.86
5.2.100.0000.04214.86
5.2.90.0000.03214.86
5.2.80.0030.02914.86
5.2.70.0000.03314.86
5.2.60.0030.03714.86
5.2.50.0000.06114.86
5.2.40.0030.05914.86
5.2.30.0060.06114.86
5.2.20.0030.04414.86
5.2.10.0030.03014.86
5.2.00.0030.02814.86
5.1.60.0030.02314.86
5.1.50.0000.02914.86
5.1.40.0000.02514.86
5.1.30.0030.02714.86
5.1.20.0070.04014.86
5.1.10.0060.02314.86
5.1.00.0030.02414.86
5.0.50.0000.02814.86
5.0.40.0070.02114.86
5.0.30.0070.02814.86
5.0.20.0000.02414.86
5.0.10.0000.02414.86
5.0.00.0030.03514.86
4.4.90.0000.01614.86
4.4.80.0040.01814.86
4.4.70.0030.02614.86
4.4.60.0070.03314.86
4.4.50.0070.01314.86
4.4.40.0000.02614.86
4.4.30.0030.02114.86
4.4.20.0100.01314.86
4.4.10.0000.02214.86
4.4.00.0030.02814.86
4.3.110.0030.01914.86
4.3.100.0070.01014.86
4.3.90.0000.01514.86
4.3.80.0000.02614.86
4.3.70.0000.01714.86
4.3.60.0000.01514.86
4.3.50.0040.01214.86
4.3.40.0000.02514.86
4.3.30.0030.01514.86
4.3.20.0000.01814.86
4.3.10.0000.01814.86
4.3.00.0000.01714.86

preferences:
38.65 ms | 401 KiB | 5 Q