3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1() { $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { } return microtime(true) - $s; } function test2() { $s = microtime(true); $i = 0; while ($i < 1000000) { $i++; } return microtime(true) - $s; } function test3() { $s = microtime(true); $i = 0; while ($i++ < 1000000) { } return microtime(true) - $s; } echo test1() . "\n\n"; echo test2() . "\n\n"; echo test3() . "\n\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.0030.03619.57
7.1.70.0070.05616.85
7.1.60.0160.04919.46
7.1.50.0070.03516.68
7.1.00.0030.10722.30
7.0.200.0030.03016.76
7.0.140.0070.10721.96
7.0.60.0070.10319.93
7.0.50.0070.11317.88
7.0.40.0030.07320.09
7.0.30.0370.10320.04
7.0.20.0270.06020.09
7.0.10.0030.06320.08
7.0.00.0030.10320.31
5.6.280.0100.16021.13
5.6.210.0100.14720.48
5.6.200.0130.10018.22
5.6.190.0130.14020.54
5.6.180.0330.15020.60
5.6.170.0300.15720.47
5.6.160.0030.16720.55
5.6.150.0030.09718.15
5.6.140.0130.14718.27
5.6.130.0070.13318.13
5.6.120.0070.15321.04
5.6.110.0070.12021.13
5.6.100.0130.15721.14
5.6.90.0030.09720.96
5.6.80.0030.14720.38
5.6.70.4470.09720.38
5.5.350.0070.15720.33
5.5.340.0000.09717.98
5.5.330.0030.10020.31
5.5.320.0100.15020.33
5.5.310.0300.11720.34
5.5.300.0000.10718.08
5.5.290.0030.13717.98
5.5.280.0130.14020.98
5.5.270.0030.15720.73
5.5.260.0100.09720.64
5.5.250.0070.09720.67
5.5.240.0300.12020.36
5.4.450.0970.13719.62
5.4.440.0200.16019.59
5.4.430.0130.14019.58
5.4.420.0270.12719.46
5.4.410.0170.14719.34
5.4.400.0170.13719.29
5.4.390.0170.13319.26
5.4.380.0300.14318.61
5.4.370.0300.12718.70
5.4.360.0270.14018.47
5.4.350.0170.14718.59
5.4.340.0330.14718.70
5.4.320.0070.09412.51
5.4.310.0070.10112.51
5.4.300.0090.09312.51
5.4.290.0050.10812.50
5.4.280.0100.13212.38
5.4.270.0110.13312.38
5.4.260.0080.17012.38
5.4.250.0060.13912.38
5.4.240.0120.13912.38
5.4.230.0060.13712.37
5.4.220.0130.13912.38
5.4.210.0150.15312.37
5.4.200.0160.16812.37
5.4.190.0100.15212.37
5.4.180.0170.13812.36
5.4.170.0150.12912.38
5.4.160.0110.13112.38
5.4.150.0060.14212.37
5.4.140.0170.13312.05
5.4.130.0100.13012.04
5.4.120.0090.14112.00
5.4.110.0080.13512.00
5.4.100.0100.13012.00
5.4.90.0110.13711.99
5.4.80.0100.13711.99
5.4.70.0110.12811.99
5.4.60.0120.13411.99
5.4.50.0090.13411.99
5.4.40.0110.13211.98
5.4.30.0090.14611.97
5.4.20.0080.15111.97
5.4.10.0080.15811.98
5.4.00.0110.15211.47
5.3.290.0070.11812.80
5.3.280.0140.18112.71
5.3.270.0190.19012.73
5.3.260.0170.19212.72
5.3.250.0120.20812.72
5.3.240.0140.16212.72
5.3.230.0060.15712.71
5.3.220.0140.18012.68
5.3.210.0120.21912.68
5.3.200.0110.17012.68
5.3.190.0080.14412.68
5.3.180.0100.16612.68
5.3.170.0110.13212.67
5.3.160.0070.12412.68
5.3.150.0130.14512.67
5.3.140.0110.14312.66
5.3.130.0070.12712.66
5.3.120.0110.11812.66
5.3.110.0110.12312.65
5.3.100.0080.12212.12
5.3.90.0090.14212.09
5.3.80.0130.12412.08
5.3.70.0110.15512.08
5.3.60.0120.16112.06
5.3.50.0170.20112.02
5.3.40.0090.17512.02
5.3.30.0090.16611.97
5.3.20.0140.15611.75
5.3.10.0130.15311.71
5.3.00.0080.16711.71
5.2.170.0050.2139.21
5.2.160.0060.1799.21
5.2.150.0130.2399.21
5.2.140.0130.2149.20
5.2.130.0120.2249.16
5.2.120.0190.2359.17
5.2.110.0150.2449.16
5.2.100.0220.2509.16
5.2.90.0140.2509.16
5.2.80.0070.2819.16
5.2.70.0100.2209.15
5.2.60.0090.1629.11
5.2.50.0050.1659.09
5.2.40.0090.2349.06
5.2.30.0120.2319.03
5.2.20.0070.2419.02
5.2.10.0230.2338.95
5.2.00.0290.4148.81
5.1.60.0190.3268.10
5.1.50.0050.2448.10
5.1.40.0130.2028.08
5.1.30.0070.1508.43
5.1.20.0050.1588.45
5.1.10.0070.1828.18
5.1.00.0090.1478.18
5.0.50.0070.4496.65
5.0.40.0090.5506.51
5.0.30.0140.5036.32
5.0.20.0070.4436.29
5.0.10.0130.5696.27
5.0.00.0130.5186.26
4.4.90.0070.5094.78
4.4.80.0040.3634.76
4.4.70.0030.3194.76
4.4.60.0050.4114.76
4.4.50.0050.4854.77
4.4.40.0070.5584.71
4.4.30.0070.4414.76
4.4.20.0060.3094.85
4.4.10.0050.3444.85
4.4.00.0040.4434.76
4.3.110.0060.3654.67
4.3.100.0060.5244.66
4.3.90.0030.4254.63
4.3.80.0060.4314.59
4.3.70.0100.4314.63
4.3.60.0070.4764.62
4.3.50.0070.3874.63
4.3.40.0060.3264.54
4.3.30.0060.4823.33
4.3.20.0050.4503.32
4.3.10.0080.3883.28
4.3.00.0000.21310.30

preferences:
72.36 ms | 400 KiB | 5 Q