3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array( array( 'id' => 314, 'name' => 'Product Example 1', 'sku' => '3324', 'price' => '3.25', 'avail' => 'Y' ), array( 'id' => 315, 'name' => 'Product Example 2', 'sku' => '3327', 'price' => '2.99', 'avail' => 'N' ) ); $arr = array(); foreach($items as $item){ $arr[] = $item; } echo "<pre>".print_r($arr, true)."</pre>"; ?>

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.0070.00716.38
8.3.50.0130.00522.11
8.3.40.0110.00418.83
8.3.30.0110.00318.66
8.3.20.0040.00420.20
8.3.10.0040.00423.66
8.3.00.0050.00319.50
8.2.180.0060.00918.34
8.2.170.0070.00722.96
8.2.160.0140.00020.47
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00317.63
8.2.120.0000.00826.35
8.2.110.0090.00020.52
8.2.100.0090.00318.04
8.2.90.0030.00719.05
8.2.80.0030.00517.97
8.2.70.0000.00917.62
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0070.00319.26
8.2.30.0070.00020.62
8.2.20.0000.01017.62
8.2.10.0040.00418.13
8.2.00.0050.00218.04
8.1.280.0090.00925.92
8.1.270.0070.00323.91
8.1.260.0040.00428.09
8.1.250.0030.00528.09
8.1.240.0000.00822.19
8.1.230.0030.00717.77
8.1.220.0050.00217.74
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0060.00317.23
8.1.180.0090.00018.10
8.1.170.0000.00718.82
8.1.160.0040.00421.96
8.1.150.0050.00318.84
8.1.140.0030.00519.63
8.1.130.0000.00717.75
8.1.120.0070.00017.52
8.1.110.0030.00317.50
8.1.100.0040.00417.49
8.1.90.0040.00417.45
8.1.80.0070.00017.41
8.1.70.0000.00717.31
8.1.60.0040.00417.58
8.1.50.0000.00817.54
8.1.40.0000.00817.54
8.1.30.0040.00417.66
8.1.20.0000.00717.65
8.1.10.0040.00417.47
8.1.00.0030.00517.45
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0040.00418.35
8.0.270.0000.00717.29
8.0.260.0000.00717.36
8.0.250.0070.00016.91
8.0.240.0030.00516.96
8.0.230.0070.00416.91
8.0.220.0000.00716.78
8.0.210.0040.00416.89
8.0.200.0000.00616.95
8.0.190.0000.00816.91
8.0.180.0080.00016.84
8.0.170.0040.00416.79
8.0.160.0000.00816.93
8.0.150.0000.00716.78
8.0.140.0070.00016.72
8.0.130.0000.00713.24
8.0.120.0040.00416.82
8.0.110.0040.00416.78
8.0.100.0050.00216.88
8.0.90.0030.00317.00
8.0.80.0090.00616.84
8.0.70.0040.00416.68
8.0.60.0000.00716.93
8.0.50.0000.00716.82
8.0.30.0120.00717.01
8.0.20.0110.00717.40
8.0.10.0000.00717.00
8.0.00.0080.01016.73
7.4.330.0050.00016.77
7.4.320.0060.00016.50
7.4.300.0060.00016.35
7.4.290.0000.00616.64
7.4.280.0000.00816.44
7.4.270.0070.00016.49
7.4.260.0000.00716.39
7.4.250.0030.00516.46
7.4.240.0020.00516.55
7.4.230.0030.00316.40
7.4.220.0210.00316.54
7.4.210.0100.00716.62
7.4.200.0000.00716.41
7.4.160.0000.01516.64
7.4.150.0070.01017.40
7.4.140.0100.01017.86
7.4.130.0070.01016.42
7.4.120.0080.00916.66
7.4.110.0100.01016.55
7.4.100.0070.01416.39
7.4.90.0140.00316.48
7.4.80.0140.00319.39
7.4.70.0130.00616.51
7.4.60.0120.00316.67
7.4.50.0040.01216.46
7.4.40.0120.00316.46
7.4.30.0060.01216.49
7.4.00.0000.01315.00
7.3.330.0050.00013.10
7.3.320.0000.00613.17
7.3.310.0000.00816.34
7.3.300.0000.00716.22
7.3.290.0040.00416.13
7.3.280.0130.00716.22
7.3.270.0130.00617.40
7.3.260.0120.01216.46
7.3.250.0100.00916.35
7.3.240.0110.00616.33
7.3.230.0140.00316.39
7.3.210.0060.00916.22
7.3.200.0110.00516.66
7.3.190.0150.00316.36
7.3.180.0090.00616.46
7.3.170.0060.01016.64
7.3.160.0030.01316.30
7.3.10.0040.01116.56
7.3.00.0090.00516.27
7.2.330.0060.01516.81
7.2.320.0080.01416.68
7.2.310.0070.01016.79
7.2.300.0030.01516.59
7.2.290.0120.01016.59
7.2.130.0050.01116.43
7.2.120.0120.00716.48
7.2.110.0100.00716.46
7.2.100.0060.00616.47
7.2.90.0080.00816.53
7.2.80.0050.00916.56
7.2.70.0110.00616.61
7.2.60.0070.00616.53
7.2.50.0110.00316.53
7.2.40.0100.00516.79
7.2.30.0050.00916.51
7.2.20.0020.01716.65
7.2.10.0060.00616.61
7.2.00.0080.00317.55
7.1.250.0090.00615.33
7.1.200.0040.00715.62
7.1.100.0030.00818.35
7.1.70.0040.00817.29
7.1.60.0130.00719.48
7.1.50.0140.01016.97
7.1.00.0070.07322.28
7.0.200.0380.01314.66
7.0.60.0000.04319.98
7.0.50.0100.08017.82
7.0.40.0070.07020.30
7.0.30.0300.08320.09
7.0.20.0330.08020.23
7.0.10.0000.07720.15
7.0.00.0030.04320.06
5.6.280.0070.05321.11
5.6.210.0000.05020.47
5.6.200.0070.03718.14
5.6.190.0030.05020.39
5.6.180.0330.07720.55
5.6.170.0100.04720.54
5.6.160.0100.06720.39
5.6.150.0130.07718.14
5.6.140.0070.07718.26
5.6.130.0030.08318.16
5.6.120.0030.05021.01
5.6.110.0170.07321.01
5.6.100.0070.03720.98
5.6.90.0170.07721.00
5.6.80.0130.06320.50
5.5.350.3030.03320.33
5.5.340.0130.07318.07
5.5.330.0170.08320.42
5.5.320.0000.06020.32
5.5.310.0270.07320.26
5.5.300.0070.03318.07
5.5.290.0070.04718.01
5.5.280.0070.04320.84
5.5.270.0270.05020.83
5.5.260.0100.06020.63
5.5.250.0130.07720.68
5.5.240.0330.05020.26

preferences:
52.09 ms | 401 KiB | 5 Q