3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = (object)array("barrels"=>array("chemID"=> 1, "catID" => 1),array("chemID"=> 2, "catID" => 1)); $carts = (object)array(array("chemID"=> 1, "catID" => 4),array("chemID"=> 2, "catID" => 4), array("chemID"=> 2, "catID" => 1)); var_dump($products); foreach($products as $barrel=>$value) { echo $barrel . ' ' . $value; }

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.0150.00416.63
8.3.50.0040.01522.11
8.3.40.0170.00318.42
8.3.30.0120.00318.67
8.3.20.0100.00320.16
8.3.10.0040.00423.71
8.3.00.0040.00419.25
8.2.180.0000.01516.88
8.2.170.0040.01122.96
8.2.160.0110.00320.47
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00417.61
8.2.120.0040.00426.35
8.2.110.0040.00720.47
8.2.100.0110.00018.05
8.2.90.0030.00619.22
8.2.80.0000.00817.97
8.2.70.0030.00617.38
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00819.24
8.2.30.0070.00020.61
8.2.20.0070.00317.62
8.2.10.0000.00817.93
8.2.00.0040.00418.16
8.1.280.0130.00325.92
8.1.270.0100.00023.96
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0070.00319.13
8.1.230.0080.00417.66
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.10
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0000.00820.10
8.1.160.0070.00022.05
8.1.150.0000.00718.89
8.1.140.0040.00719.58
8.1.130.0040.00417.61
8.1.120.0000.00717.48
8.1.110.0040.00417.50
8.1.100.0000.00817.34
8.1.90.0000.00717.41
8.1.80.0000.00717.37
8.1.70.0030.00317.36
8.1.60.0000.00717.48
8.1.50.0040.00417.53
8.1.40.0000.00817.54
8.1.30.0070.00317.55
8.1.20.0000.00717.59
8.1.10.0070.00017.49
8.1.00.0000.00917.42
8.0.300.0040.00418.84
8.0.290.0000.00816.75
8.0.280.0070.00018.50
8.0.270.0000.00717.21
8.0.260.0040.00417.30
8.0.250.0060.00017.02
8.0.240.0000.00716.93
8.0.230.0070.00016.89
8.0.220.0070.00016.95
8.0.210.0030.00316.95
8.0.200.0060.00016.90
8.0.190.0070.00016.88
8.0.180.0040.00416.97
8.0.170.0030.00517.00
8.0.160.0030.00516.95
8.0.150.0000.00716.85
8.0.140.0040.00416.92
8.0.130.0060.00013.31
8.0.120.0000.00816.82
8.0.110.0050.00316.96
8.0.100.0000.00816.95
8.0.90.0050.00316.97
8.0.80.0150.00016.84
8.0.70.0000.00816.96
8.0.60.0000.00717.02
8.0.50.0000.00816.86
8.0.30.0100.00717.16
8.0.20.0080.01017.40
8.0.10.0040.00417.12
8.0.00.0080.01016.84
7.4.330.0000.00616.70
7.4.320.0000.00616.53
7.4.300.0000.00616.41
7.4.290.0070.00016.51
7.4.280.0030.00616.40
7.4.270.0070.00016.52
7.4.260.0000.00816.51
7.4.250.0050.00316.58
7.4.240.0020.00516.51
7.4.230.0030.00316.58
7.4.220.0110.01216.70
7.4.210.0070.00816.56
7.4.200.0000.00716.39
7.4.160.0060.00916.48
7.4.150.0030.01317.40
7.4.140.0110.00917.86
7.4.130.0120.00516.51
7.4.120.0060.01216.42
7.4.110.0110.00716.43
7.4.100.0110.00916.51
7.4.90.0130.00716.66
7.4.80.0140.00619.39
7.4.70.0090.00916.48
7.4.60.0120.00416.46
7.4.50.0070.00716.66
7.4.40.0060.01316.53
7.4.30.0090.00916.47
7.4.00.0030.01415.03
7.3.330.0030.00313.06
7.3.320.0030.00313.30
7.3.310.0030.00316.43
7.3.300.0070.00016.31
7.3.290.0050.00216.30
7.3.280.0070.00916.27
7.3.270.0110.00717.40
7.3.260.0130.00316.60
7.3.250.0120.00816.33
7.3.240.0120.00816.41
7.3.230.0130.00416.39
7.3.210.0080.00816.52
7.3.200.0040.01416.35
7.3.190.0070.01016.52
7.3.180.0060.01016.35
7.3.170.0110.00516.56
7.3.160.0090.00816.60
7.2.330.0180.00616.73
7.2.320.0100.01416.64
7.2.310.0130.00316.52
7.2.300.0090.00916.38
7.2.290.0150.00916.36
7.2.60.0060.01016.64
7.1.200.0030.00915.52
7.1.100.0060.00317.84
7.1.70.0000.00816.87
7.1.60.0100.01419.48
7.1.50.0120.00916.96
7.1.00.0070.07322.46
7.0.200.0450.00414.41
7.0.60.0100.05719.86
7.0.50.0000.04717.90
7.0.40.0000.08320.24
7.0.30.0370.06720.13
7.0.20.0230.05320.16
7.0.10.0100.07020.00
7.0.00.0070.09020.29
5.6.280.0000.03720.89
5.6.210.0230.05320.61
5.6.200.0070.08318.20
5.6.190.0070.06020.35
5.6.180.0230.04020.61
5.6.170.0170.09020.50
5.6.160.0030.05320.51
5.6.150.0100.07718.09
5.6.140.0070.04318.11
5.6.130.0030.09018.18
5.6.120.0200.07321.02
5.6.110.0030.09021.13
5.6.100.0170.07321.11
5.6.90.0070.04021.03
5.6.80.0030.08320.28
5.5.350.0330.04020.40
5.5.340.0030.04317.91
5.5.330.0000.09020.40
5.5.320.0070.04020.41
5.5.310.0230.06720.28
5.5.300.0000.08717.95
5.5.290.0100.04317.91
5.5.280.0070.04020.80
5.5.270.0030.08720.86
5.5.260.0070.04720.70
5.5.250.0100.08320.70
5.5.240.0270.07320.26

preferences:
64.13 ms | 401 KiB | 5 Q