3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array_fill(0, 100000, '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.0060.01025.39
7.1.70.0030.00923.02
7.1.60.0180.01823.16
7.1.50.0260.01640.75
7.1.00.0030.08328.26
7.0.200.0030.01222.60
7.0.140.0070.07728.08
7.0.60.0070.06324.19
7.0.50.0030.09322.14
7.0.40.0030.05022.79
7.0.30.0830.06722.72
7.0.20.0230.05022.78
7.0.10.0000.05722.93
7.0.00.0130.04022.77
5.6.280.0070.10031.16
5.6.210.0200.08330.66
5.6.200.0070.05328.17
5.6.190.0100.05330.35
5.6.180.0370.09030.21
5.6.170.0270.05330.31
5.6.160.0170.07730.37
5.6.150.0100.07027.97
5.6.140.0130.09028.21
5.6.130.0030.08028.07
5.6.120.0070.10331.06
5.6.110.0170.07731.06
5.6.100.0100.05730.93
5.6.90.0100.08031.18
5.6.80.0100.07730.43
5.5.350.0300.09030.40
5.5.340.0070.08027.93
5.5.330.0070.07030.34
5.5.320.0070.07330.32
5.5.310.0370.08330.01
5.5.300.0130.09728.04
5.5.290.0200.08727.94
5.5.280.0200.09330.89
5.5.270.0170.09731.02
5.5.260.0130.09030.80
5.5.250.0130.09030.84
5.5.240.0270.09330.31
5.4.450.1130.06029.36
5.4.440.0600.04729.32
5.4.430.0500.05329.29
5.4.420.0600.04729.29
5.4.410.0200.07029.09
5.4.400.0130.07328.53
5.4.390.0200.07328.60
5.4.380.0230.08328.70
5.4.370.0300.08028.81
5.4.360.0300.07028.67
5.4.350.0300.07328.81
5.4.340.0400.06028.54
5.4.320.0040.05622.76
5.4.310.0090.05322.50
5.4.300.0100.04922.76
5.4.290.0140.05522.75
5.4.280.0070.05322.63
5.4.270.0110.06022.63
5.4.260.0130.05722.63
5.4.250.0150.05622.63
5.4.240.0180.06122.63
5.4.230.0090.06322.62
5.4.220.0120.05322.62
5.4.210.0120.05222.62
5.4.200.0050.06322.62
5.4.190.0130.05522.61
5.4.180.0070.05922.62
5.4.170.0120.05122.63
5.4.160.0100.06122.62
5.4.150.0120.07022.62
5.4.140.0090.07622.30
5.4.130.0130.05222.29
5.4.120.0080.05322.25
5.4.110.0060.05422.25
5.4.100.0110.06522.25
5.4.90.0130.08622.24
5.4.80.0140.07322.24
5.4.70.0110.07822.24
5.4.60.0140.05122.24
5.4.50.0050.06022.24
5.4.40.0130.05022.23
5.4.30.0140.05522.23
5.4.20.0120.06122.23
5.4.10.0150.05222.22
5.4.00.0110.06621.71
5.3.290.0090.05422.72
5.3.280.0120.07222.63
5.3.270.0190.07122.64
5.3.260.0140.06422.64
5.3.250.0090.05422.64
5.3.240.0100.06022.64
5.3.230.0120.05822.63
5.3.220.0130.06022.60
5.3.210.0160.07122.60
5.3.200.0110.07322.60
5.3.190.0110.07222.60
5.3.180.0130.07222.59
5.3.170.0100.07522.59
5.3.160.0130.07222.59
5.3.150.0160.07422.60
5.3.140.0070.06122.59
5.3.130.0150.06222.58
5.3.120.0150.07822.58
5.3.110.0120.05522.58
5.3.100.0090.05322.07
5.3.90.0070.06522.05
5.3.80.0110.05722.04
5.3.70.0110.05722.04
5.3.60.0100.05722.03
5.3.50.0120.05421.97
5.3.40.0120.06121.97
5.3.30.0130.06821.93
5.3.20.0090.05821.71
5.3.10.0070.05821.67
5.3.00.0140.06321.67
5.2.170.0170.04418.29
5.2.160.0050.04818.29
5.2.150.0090.04918.29
5.2.140.0110.04418.29
5.2.130.0050.04818.25
5.2.120.0110.03818.25
5.2.110.0080.04418.25
5.2.100.0150.04518.25
5.2.90.0090.05818.25
5.2.80.0090.04718.24
5.2.70.0090.04618.24
5.2.60.0120.03918.19
5.2.50.0140.04618.25
5.2.40.0110.05318.23
5.2.30.0060.05918.20
5.2.20.0100.05618.45
5.2.10.0090.05118.12
5.2.00.0060.04417.99
5.1.60.0140.03919.61
5.1.50.0130.03319.61
5.1.40.0080.03719.59
5.1.30.0110.05119.94
5.1.20.0080.05119.96
5.1.10.0090.04919.69
5.1.00.0090.05119.69
5.0.50.0110.06118.17
5.0.40.0080.04418.03
5.0.30.0100.05617.84
5.0.20.0100.04517.81
5.0.10.0080.05017.79
5.0.00.0100.05617.78
4.4.90.0090.03616.21
4.4.80.0050.03516.20
4.4.70.0080.03216.20
4.4.60.0050.03216.20
4.4.50.0070.03516.21
4.4.40.0100.04216.21
4.4.30.0070.03216.20
4.4.20.0070.03216.27
4.4.10.0050.03416.26
4.4.00.0080.04616.23
4.3.110.0080.03116.14
4.3.100.0060.03116.13
4.3.90.0130.03416.11
4.3.80.0100.04616.11
4.3.70.0070.04116.11
4.3.60.0060.04316.11
4.3.50.0110.03916.11
4.3.40.0060.05416.06
4.3.30.0040.04414.88
4.3.20.0070.06714.85
4.3.10.0040.04314.81
4.3.00.0100.03015.94

preferences:
35.37 ms | 401 KiB | 5 Q