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.0070.02719.40
7.1.70.0000.02717.26
7.1.60.0100.03719.46
7.1.50.0000.06716.60
7.1.00.0000.11322.34
7.0.200.0000.03116.93
7.0.140.0000.11022.18
7.0.110.0100.12719.96
7.0.100.0070.11319.86
7.0.90.0100.10719.94
7.0.80.0130.10019.84
7.0.70.0000.09020.01
7.0.60.0070.11719.94
7.0.50.0030.11320.29
7.0.40.0130.10320.16
7.0.30.0100.11720.17
7.0.20.0170.10020.03
7.0.10.0200.13320.08
7.0.00.0070.11020.18
5.6.280.0030.17021.13
5.6.260.0100.14320.67
5.6.250.0070.15020.70
5.6.240.0170.13020.48
5.6.230.0070.14720.66
5.6.220.0070.09320.56
5.6.210.0070.15320.61
5.6.200.0130.14721.04
5.6.190.0130.12021.20
5.6.180.0070.14020.99
5.6.170.0070.14020.96
5.6.160.0100.11720.96
5.6.150.0100.17021.20
5.6.140.0100.16021.09
5.6.130.0100.16021.19
5.6.120.0000.15021.06
5.6.110.0070.12020.93
5.6.100.0130.12721.14
5.6.90.0030.13721.04
5.6.80.0070.12320.54
5.6.70.0200.14720.57
5.6.60.0000.12720.57
5.6.50.0070.15320.38
5.6.40.0130.11020.61
5.6.30.0000.12720.66
5.6.20.0030.09320.29
5.6.10.0030.10020.34
5.6.00.0030.10720.43
5.5.380.0170.14020.57
5.5.370.0000.09320.53
5.5.360.0030.14720.54
5.5.350.0070.13720.51
5.5.340.0070.15720.71
5.5.330.0100.14020.79
5.5.320.0070.13020.91
5.5.310.0070.14720.77
5.5.300.0030.17020.99
5.5.290.0170.12720.80
5.5.280.0170.12720.89
5.5.270.0070.13720.89
5.5.260.0070.17020.77
5.5.250.0100.12320.63
5.5.240.0030.15320.13
5.5.230.0070.12020.16
5.5.220.0170.14720.37
5.5.210.0030.16020.36
5.5.200.0130.14720.26
5.5.190.0070.13720.16
5.5.180.0100.10720.24
5.5.160.0030.14320.32
5.5.150.0170.13720.32
5.5.140.0100.10020.09
5.5.130.0130.16320.32
5.5.120.0130.15720.32
5.5.110.0070.09720.26
5.5.100.0130.14320.12
5.5.90.0030.09320.22
5.5.80.0100.11020.01
5.5.70.0070.14720.10
5.5.60.0030.10320.04
5.5.50.0130.10320.18
5.5.40.0030.12320.04
5.5.30.0100.09020.20
5.5.20.0030.11320.09
5.5.10.0070.09320.20
5.5.00.0030.10020.18
5.4.450.0030.16319.33
5.4.440.0270.14019.32
5.4.430.0100.14719.46
5.4.420.0030.15319.50
5.4.410.0070.13319.21
5.4.400.0130.14319.19
5.4.390.0070.15019.16
5.4.380.0070.19019.03
5.4.370.0100.13318.99
5.4.360.0130.13319.05
5.4.350.0070.15318.95
5.4.340.0070.10318.96
5.4.320.0000.09719.23
5.4.310.0030.09319.14
5.4.300.0100.10019.18
5.4.290.0030.10719.18
5.4.280.0000.15019.00
5.4.270.0030.09718.95
5.4.260.0070.13719.02
5.4.250.0070.12719.17
5.4.240.0030.10719.08
5.4.230.0030.09318.98
5.4.220.0070.10719.09
5.4.210.0000.10718.98
5.4.200.0030.09319.13
5.4.190.0070.09019.18
5.4.180.0130.08318.94
5.4.170.0070.14718.97
5.4.160.0000.09718.93
5.4.150.0070.16319.14
5.4.140.0030.14316.57
5.4.130.0070.15016.38
5.4.120.0030.14716.56
5.4.110.0100.12716.55
5.4.100.0070.14316.61
5.4.90.0070.12016.37
5.4.80.0100.14016.45
5.4.70.0100.13716.50
5.4.60.0030.14016.52
5.4.50.0100.12716.57
5.4.40.0100.14316.50
5.4.30.0100.12716.54
5.4.20.0070.14316.53
5.4.10.0130.14316.49
5.4.00.0100.12015.82
5.3.290.0070.10714.70
5.3.280.0000.11014.60
5.3.270.0170.10314.64
5.3.260.0030.13014.62
5.3.250.0070.14314.76
5.3.240.0030.16714.58
5.3.230.0030.11314.69
5.3.220.0030.14314.70
5.3.210.0070.14714.56
5.3.200.0100.16014.70
5.3.190.0070.18314.58
5.3.180.0170.14314.57
5.3.170.0070.15714.58
5.3.160.0070.17314.58
5.3.150.0030.17014.44
5.3.140.0070.16714.57
5.3.130.0070.16714.68
5.3.120.0100.16314.55
5.3.110.0100.15714.64
5.3.100.0100.15714.04
5.3.90.0070.18013.89
5.3.80.0170.16014.17
5.3.70.0100.18013.99
5.3.60.0070.12014.23
5.3.50.0030.17013.96
5.3.40.0230.16014.18
5.3.30.0070.18013.88
5.3.20.0000.16713.83
5.3.10.0070.16713.74
5.3.00.0100.16313.71
5.2.170.0000.18011.87
5.2.160.0070.18311.87
5.2.150.0170.13011.87
5.2.140.0030.17711.87
5.2.130.0000.16311.87
5.2.120.0130.16011.87
5.2.110.0000.16711.87
5.2.100.0070.13711.87
5.2.90.0070.14011.87
5.2.80.0030.19011.87
5.2.70.0030.17311.87
5.2.60.0100.18011.87
5.2.50.0030.17311.87
5.2.40.0070.16711.87
5.2.30.0100.19011.87
5.2.20.0130.16311.87
5.2.10.0030.17711.87
5.2.00.0070.15711.87
5.1.60.0000.18011.87
5.1.50.0000.19711.87
5.1.40.0100.15711.87
5.1.30.0030.17311.87
5.1.20.0030.16011.87
5.1.10.0070.16011.87
5.1.00.0100.17311.87
5.0.50.0030.29011.87
5.0.40.0030.29711.87
5.0.30.0070.28711.87
5.0.20.0000.29711.87
5.0.10.0000.30711.87
5.0.00.0030.28311.87
4.4.90.0000.26311.87
4.4.80.0000.28011.87
4.4.70.0100.27011.87
4.4.60.0000.28011.87
4.4.50.0000.27711.87
4.4.40.0070.30011.87
4.4.30.0000.28011.87
4.4.20.0000.28011.87
4.4.10.0070.27711.87
4.4.00.0000.30011.87
4.3.110.0000.27011.87
4.3.100.0030.27011.87
4.3.90.0030.27011.87
4.3.80.0070.28311.87
4.3.70.0030.24711.87
4.3.60.0030.29711.87
4.3.50.0070.28311.87
4.3.40.0030.31011.87
4.3.30.0000.27711.87
4.3.20.0000.27011.87
4.3.10.0070.25711.87
4.3.00.0030.28311.87

preferences:
39.08 ms | 400 KiB | 5 Q