3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array_fill(0, 500000, ['test' => 'hello']); $start = microtime(true); foreach ($arr as $ar) {} echo 'Array Iteration :' . round(microtime(true) - $start, 4) . "\n"; $arr = SplFixedArray::fromArray($arr); $start = microtime(true); foreach ($arr as $ar) {} echo 'SPL Iteration :' . round(microtime(true) - $start, 4) . "\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)
7.2.00.0210.04142.79
7.1.70.0030.03040.64
7.1.60.0200.05740.83
7.1.50.0070.04340.24
7.1.00.0100.11045.74
7.0.200.0440.02240.16
7.0.140.0130.10045.59
7.0.60.0300.10042.66
7.0.50.0100.09740.42
7.0.40.0230.11342.51
7.0.30.0730.08042.53
7.0.20.0570.10742.46
7.0.10.0100.08042.33
7.0.00.0200.10342.43
5.6.280.0300.17071.28
5.6.210.0200.16070.89
5.6.200.0300.10368.43
5.6.190.0470.18070.63
5.6.180.0470.18370.64
5.6.170.0670.11370.67
5.6.160.0230.15070.51
5.6.150.0100.18368.32
5.6.140.0170.15768.44
5.6.130.0300.12768.42
5.6.120.0230.11371.17
5.6.110.0270.17071.28
5.6.100.0470.16771.22
5.6.90.0630.16771.23
5.6.80.0230.15370.64
5.5.350.0030.18070.96
5.5.340.0300.12068.15
5.5.330.0170.15070.39
5.5.320.0200.18070.65
5.5.310.0370.12370.44
5.5.300.0170.13068.13
5.5.290.0270.16068.00
5.5.280.0330.15371.04
5.5.270.0330.16771.06
5.5.260.0330.16371.11
5.5.250.0270.13770.81
5.5.240.0300.10770.38
5.4.450.1100.15369.81
5.4.440.1330.19369.60
5.4.430.0270.17769.74
5.4.420.1570.19069.30
5.4.410.1270.19769.55
5.4.400.1200.17369.34
5.4.390.1900.21769.23
5.4.380.0570.21068.89
5.4.370.0470.16068.66
5.4.360.0500.16068.71
5.4.350.0570.14768.79
5.4.340.0470.16069.03
5.4.320.0250.11162.73
5.4.310.0170.12962.72
5.4.300.0200.12462.72
5.4.290.0260.13362.72
5.4.280.0270.11562.59
5.4.270.0260.12762.59
5.4.260.0260.11662.59
5.4.250.0280.16762.59
5.4.240.0210.12662.59
5.4.230.0190.12362.58
5.4.220.0210.11762.58
5.4.210.0200.11962.58
5.4.200.0200.13162.58
5.4.190.0250.11162.57
5.4.180.0230.12162.58
5.4.170.0190.12362.59
5.4.160.0250.11662.59
5.4.150.0220.12062.58
5.4.140.0180.11962.27
5.4.130.0180.12462.25
5.4.120.0170.12262.21
5.4.110.0230.11662.21
5.4.100.0230.13362.21
5.4.90.0210.13862.21
5.4.80.0170.12862.20
5.4.70.0280.11862.20
5.4.60.0200.13462.20
5.4.50.0220.11762.20
5.4.40.0140.12662.19
5.4.30.0270.11462.19
5.4.20.0180.12162.19
5.4.10.0210.11862.19
5.4.00.0240.11461.67
5.3.290.0040.04212.80
5.3.280.0060.04012.71
5.3.270.0090.03612.72
5.3.260.0080.03812.72
5.3.250.0040.04012.72
5.3.240.0050.03912.72
5.3.230.0090.03512.71
5.3.220.0040.03912.68
5.3.210.0050.04212.68
5.3.200.0090.03612.68
5.3.190.0030.04212.68
5.3.180.0060.03712.67
5.3.170.0040.03912.67
5.3.160.0060.04012.68
5.3.150.0100.03412.67
5.3.140.0080.03612.66
5.3.130.0090.04112.66
5.3.120.0070.04112.66
5.3.110.0060.03912.66
5.3.100.0060.03712.12
5.3.90.0080.04712.08
5.3.80.0080.04112.08
5.3.70.0060.04112.07
5.3.60.0060.03912.06
5.3.50.0100.03912.00
5.3.40.0050.03812.00
5.3.30.0090.03411.94
5.3.20.0070.03711.70
5.3.10.0060.04211.67
5.3.00.0070.05011.66
5.2.170.0090.0329.15
5.2.160.0040.0339.15
5.2.150.0060.0399.15
5.2.140.0040.0329.14
5.2.130.0030.0319.11
5.2.120.0030.0309.10
5.2.110.0050.0299.12
5.2.100.0040.0329.12
5.2.90.0040.0329.11
5.2.80.0040.0359.11
5.2.70.0090.0329.11
5.2.60.0090.0349.06
5.2.50.0060.0379.03
5.2.40.0070.0349.01
5.2.30.0070.0278.99
5.2.20.0020.0318.97
5.2.10.0030.0298.90
5.2.00.0050.0288.77
5.1.60.0050.0238.05
5.1.50.0040.0248.05
5.1.40.0040.0258.04
5.1.30.0030.0298.38
5.1.20.0040.0288.40
5.1.10.0070.0248.13
5.1.00.0050.0268.12
5.0.50.0000.0256.60
5.0.40.0030.0196.47
5.0.30.0020.0336.27
5.0.20.0050.0216.25
5.0.10.0050.0206.23
5.0.00.0060.0336.21
4.4.90.0030.0184.78
4.4.80.0030.0214.75
4.4.70.0050.0174.76
4.4.60.0070.0184.75
4.4.50.0030.0224.77
4.4.40.0040.0324.71
4.4.30.0030.0164.76
4.4.20.0020.0214.84
4.4.10.0040.0174.85
4.4.00.0030.0254.76
4.3.110.0050.0144.67
4.3.100.0020.0154.66
4.3.90.0030.0144.64
4.3.80.0040.0234.58
4.3.70.0030.0164.63
4.3.60.0020.0224.63
4.3.50.0050.0204.63
4.3.40.0020.0324.54
4.3.30.0020.0173.27
4.3.20.0020.0163.25
4.3.10.0020.0163.22
4.3.00.0170.0177.16

preferences:
38.91 ms | 400 KiB | 5 Q