3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = microtime(true); $a = ''; for($i=0; $i<1000000; $i++) $a = 'yay'; echo round(microtime(true)-$t); $t = microtime(true); $a = ''; for($i=0; $i<1000000; $i++) $a = "yay"; echo round(microtime(true)-$t);

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.1.70.0030.02617.12
7.1.60.0070.06419.21
7.1.50.0100.06916.93
7.1.00.0030.07322.40
7.0.200.0030.06216.72
7.0.140.0070.10322.08
7.0.100.0200.12020.02
7.0.90.0230.09321.70
7.0.80.0370.11320.13
7.0.70.0130.07719.95
7.0.60.0270.10019.93
7.0.50.0100.10320.36
7.0.40.0170.12320.15
7.0.30.0030.11320.07
7.0.20.0070.11020.15
7.0.10.0030.09020.07
7.0.00.0070.13319.95
5.6.280.0130.18321.07
5.6.250.0100.18720.66
5.6.240.0130.16020.61
5.6.230.0070.19020.57
5.6.220.0170.18020.59
5.6.210.0200.14720.74
5.6.200.0100.15321.03
5.6.190.0000.19021.11
5.6.180.0100.12721.05
5.6.170.0270.17321.11
5.6.160.0030.20721.06
5.6.150.0070.16021.12
5.6.140.0170.15020.96
5.6.130.0130.16321.11
5.6.120.0030.21021.16
5.6.110.0100.16321.13
5.6.100.0070.14321.15
5.6.90.0070.20021.07
5.6.80.0070.16720.33
5.6.70.0100.19720.42
5.6.60.0130.20720.33
5.6.50.0100.12320.34
5.6.40.0130.14720.40
5.6.30.0130.15020.48
5.6.20.0130.14720.48
5.6.10.0000.16720.39
5.6.00.0070.18320.41
5.5.380.0030.16020.39
5.5.370.0030.15320.36
5.5.360.0030.10720.48
5.5.350.0170.16720.39
5.5.340.0170.16320.92
5.5.330.0130.15020.92
5.5.320.0100.18720.83
5.5.310.0030.20020.90
5.5.300.0000.13020.88
5.5.290.0230.15020.92
5.5.280.0030.15720.83
5.5.270.0070.15020.85
5.5.260.0070.20020.63
5.5.250.0130.11720.73
5.5.240.0200.15320.22
5.5.230.0070.17720.10
5.5.220.0000.17320.23
5.5.210.0070.16720.26
5.5.200.0170.14020.25
5.5.190.0070.12320.21
5.5.180.0070.19020.09
5.5.160.0100.10020.26
5.5.150.0130.20020.08
5.5.140.0030.14020.23
5.5.130.0100.16320.15
5.5.120.0070.15320.26
5.5.110.0100.16320.25
5.5.100.0030.15720.18
5.5.90.0100.16319.98
5.5.80.0070.15319.97
5.5.70.0100.17320.11
5.5.60.0000.16020.05
5.5.50.0070.16320.05
5.5.40.0100.15720.04
5.5.30.0030.18320.14
5.5.20.0130.14020.13
5.5.10.0100.13720.03
5.5.00.0100.16719.96
5.4.450.0100.15319.40
5.4.440.0100.12719.30
5.4.430.0000.16019.32
5.4.420.0030.15019.31
5.4.410.0100.17719.48
5.4.400.0000.11719.01
5.4.390.0070.14719.16
5.4.380.0100.16019.02
5.4.370.0200.14319.09
5.4.360.0070.14719.01
5.4.350.0070.14018.96
5.4.340.0100.12019.30
5.4.320.0070.13319.15
5.4.310.0100.14718.96
5.4.300.0000.12318.85
5.4.290.0070.11319.20
5.4.280.0200.14719.14
5.4.270.0000.15318.96
5.4.260.0030.15319.04
5.4.250.0100.10719.07
5.4.240.0100.15319.10
5.4.230.0000.13018.84
5.4.220.0100.15018.98
5.4.210.0070.16319.10
5.4.200.0270.16018.87
5.4.190.0070.14319.00
5.4.180.0070.14718.89
5.4.170.0100.14019.07
5.4.160.0000.16018.96
5.4.150.0130.16019.05
5.4.140.0030.16016.37
5.4.130.0070.16716.35
5.4.120.0070.12016.18
5.4.110.0100.15016.43
5.4.100.0030.15316.39
5.4.90.0170.16016.21
5.4.80.0030.15716.44
5.4.70.0030.10016.20
5.4.60.0100.16016.31
5.4.50.0070.15016.27
5.4.40.0030.13716.47
5.4.30.0070.14316.34
5.4.20.0070.13016.34
5.4.10.0170.12316.42
5.4.00.0030.14315.74
5.3.290.0100.21314.58
5.3.280.0030.21314.57
5.3.270.0030.19014.53
5.3.260.0070.15314.58
5.3.250.0130.18014.65
5.3.240.0070.15014.55
5.3.230.0030.18714.66
5.3.220.0070.20714.62
5.3.210.0070.18714.47
5.3.200.0130.19314.53
5.3.190.0100.15314.50
5.3.180.0100.20014.52
5.3.170.0030.18314.55
5.3.160.0070.20314.62
5.3.150.0030.19714.54
5.3.140.0000.18714.55
5.3.130.0070.21714.43
5.3.120.0070.17314.52
5.3.110.0070.20014.50
5.3.100.0030.19014.10
5.3.90.0070.17013.99
5.3.80.0070.21314.06
5.3.70.0070.15013.86
5.3.60.0030.18713.98
5.3.50.0130.21313.93
5.3.40.0030.20013.80
5.3.30.0100.19713.84
5.3.20.0170.16713.47
5.3.10.0000.18013.64
5.3.00.0000.14313.60
5.2.170.0070.22711.96
5.2.160.0030.20011.96
5.2.150.0000.24711.96
5.2.140.0030.19711.96
5.2.130.0030.20711.96
5.2.120.0000.19011.96
5.2.110.0130.23311.96
5.2.100.0070.17011.96
5.2.90.0000.19711.96
5.2.80.0030.20711.96
5.2.70.0100.19711.96
5.2.60.0030.21311.96
5.2.50.0070.20711.96
5.2.40.0070.22011.96
5.2.30.0070.16311.96
5.2.20.0170.16311.96
5.2.10.0070.14711.96
5.2.00.0000.15311.96
5.1.60.0030.15011.96
5.1.50.0000.16311.96
5.1.40.0000.15311.96
5.1.30.0030.15311.96
5.1.20.0100.15011.96
5.1.10.0030.21311.96
5.1.00.0000.16011.96
5.0.50.0030.38711.96
5.0.40.0030.28311.96
5.0.30.0000.28711.96
5.0.20.0030.33311.96
5.0.10.0000.27011.96
5.0.00.0030.28311.96
4.4.90.0000.36011.96
4.4.80.0000.36711.96
4.4.70.0070.27011.96
4.4.60.0070.33311.96
4.4.50.0070.27011.96
4.4.40.0030.24711.96
4.4.30.0100.21711.96
4.4.20.0030.35311.96
4.4.10.0000.26711.96
4.4.00.0000.29011.96
4.3.110.0030.31011.96
4.3.100.0030.29711.96
4.3.90.0000.26311.96
4.3.80.0030.32711.96
4.3.70.0030.30011.96
4.3.60.0000.31711.96
4.3.50.0000.32011.96
4.3.40.0100.31311.96
4.3.30.0000.30311.96
4.3.20.0000.32011.96
4.3.10.0030.28311.96
4.3.00.0000.30711.96

preferences:
34.91 ms | 401 KiB | 5 Q