3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i=1;$i<1001;$i*=10) { $starttime=round( microtime(TRUE)*$i); $now= shortenb64($starttime); $len=strlen($now); $min= str_repeat("0", $len); $max= str_repeat("z", $len); $nowtime=date("Y-m-d H:i:s", $nowS=epxandb64($now)/$i); $minS=epxandb64($min)/$i; $maxS=epxandb64($max)/$i; $minYear = 1970+($minS/ (60*60*24*365.25)); $maxYear = 1970+($maxS/ (60*60*24*365.25)); echo "$i $starttime --- $now ($nowtime): --- min year ($minYear) --- max year ($maxYear)"; } function shortenb64($id, $alphabet='-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz') { $base = strlen($alphabet); $short = ''; while($id) { $id = round(($id-($r=$id%$base))/$base); $short = $alphabet{$r} . $short; } return $short; } function epxandb64($id, $alphabet='-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz') { $base = strlen($alphabet); $len = strlen($id)-1; $long = 0.0; $mul=1; for($i=$len;$i>=0;$i--) { $long += strpos($alphabet, substr($id, $i,1))*$mul; $mul *= $base; } return $long; }

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.4.00.0130.00714.82
7.3.120.0040.01514.96
7.3.110.0110.00815.27
7.3.100.0000.01615.12
7.3.90.0000.01415.18
7.3.80.0040.01115.16
7.3.70.0070.01015.05
7.3.60.0110.00715.09
7.3.50.0070.00415.05
7.3.40.0090.00315.29
7.3.30.0000.01014.99
7.3.20.0060.00916.87
7.3.10.0070.00716.89
7.3.00.0070.01016.82
7.2.250.0070.00715.49
7.2.240.0070.01415.22
7.2.230.0070.01115.27
7.2.220.0060.00615.16
7.2.210.0030.00915.19
7.2.200.0040.01115.13
7.2.190.0070.00315.33
7.2.180.0080.00315.44
7.2.170.0030.01415.06
7.1.330.0070.01015.98
7.1.320.0000.01516.20
7.1.310.0110.00415.83
7.1.300.0030.01316.05
7.1.290.0030.01016.11
7.1.280.0070.00316.02
7.1.270.0030.00915.83
7.1.260.0030.01016.07
7.1.70.0080.00317.44
7.1.60.0100.01619.17
7.1.50.0170.00716.88
7.1.00.0000.07722.48
7.0.200.0000.01016.86
7.0.140.0100.07022.14
7.0.80.0230.07020.10
7.0.70.0530.07020.15
7.0.60.0470.08320.11
7.0.50.0400.07720.50
7.0.40.0170.05320.27
7.0.30.0130.05020.33
7.0.20.0130.08020.27
7.0.10.0070.08320.24
7.0.00.0230.06320.25
5.6.280.0070.07021.13
5.6.230.0130.08020.82
5.6.220.0030.08020.79
5.6.210.0130.06020.84
5.6.200.0030.08721.29
5.6.190.0100.08021.20
5.6.180.0130.07021.31
5.6.170.0130.07321.21
5.6.160.0100.08021.21
5.6.150.0070.06021.25
5.6.140.0030.07321.25
5.6.130.0200.07321.20
5.6.120.0200.06021.19
5.6.110.0000.06321.25
5.6.100.0030.09321.22
5.6.90.0030.07021.15
5.6.80.0030.05320.67
5.6.70.0070.08320.61
5.6.60.0130.06020.71
5.6.50.0100.07720.72
5.6.40.0170.07320.64
5.6.30.0000.07020.61
5.6.20.0170.07320.54
5.6.10.0130.06320.60
5.6.00.0070.07720.62
5.5.370.0100.05320.67
5.5.360.0130.08020.59
5.5.350.0070.07720.69
5.5.340.0200.04021.13
5.5.330.0000.05721.00
5.5.320.0070.08321.04
5.5.310.0100.08021.16
5.5.300.0070.07720.85
5.5.290.0100.04321.08
5.5.280.0070.05721.06
5.5.270.0070.08721.08
5.5.260.0070.06021.09
5.5.250.0130.05320.80
5.5.240.0070.08020.26
5.5.230.0100.05720.41
5.5.220.0100.08020.46
5.5.210.0070.07720.53
5.5.200.0130.04020.36
5.5.190.0130.06020.35
5.5.180.0070.08020.41
5.5.160.0100.07020.46
5.5.150.0130.07020.23
5.5.140.0100.04720.33
5.5.130.0070.08020.34
5.5.120.0000.07320.33
5.5.110.0100.08020.46
5.5.100.0100.07020.32
5.5.90.0070.06320.28
5.5.80.0100.07720.18
5.5.70.0200.03320.30
5.5.60.0030.08320.20
5.5.50.0170.07020.31
5.5.40.0100.07720.33
5.5.30.0070.07720.14
5.5.20.0100.08320.26
5.5.10.0130.07320.20
5.5.00.0070.07720.27
5.4.450.0070.08319.59
5.4.440.0000.08319.46
5.4.430.0100.07019.54
5.4.420.0070.06019.54
5.4.410.0030.04719.36
5.4.400.0170.06719.36
5.4.390.0200.06019.12
5.4.380.0100.04719.14
5.4.370.0000.08319.22
5.4.360.0100.07719.31
5.4.350.0100.07319.27
5.4.340.0030.05719.15
5.4.320.0000.08019.16
5.4.310.0130.07719.04
5.4.300.0100.08319.41
5.4.290.0100.07319.21
5.4.280.0100.07019.27
5.4.270.0070.07719.30
5.4.260.0070.08019.31
5.4.250.0100.04319.41
5.4.240.0130.08719.31
5.4.230.0070.04019.23
5.4.220.0070.07319.08
5.4.210.0070.08019.05
5.4.200.0030.05019.16
5.4.190.0000.07719.10
5.4.180.0130.07019.02
5.4.170.0200.07319.25
5.4.160.0000.08019.13
5.4.150.0030.08719.10
5.4.140.0130.05316.66
5.4.130.0100.05716.63
5.4.120.0070.04716.57
5.4.110.0130.07016.66
5.4.100.0030.07016.45
5.4.90.0000.05016.46
5.4.80.0030.05716.43
5.4.70.0100.07716.57
5.4.60.0070.04016.67
5.4.50.0130.04016.57
5.4.40.0000.05316.55
5.4.30.0100.07016.55
5.4.20.0100.06016.57
5.4.10.0070.08016.64
5.4.00.0100.06716.05
5.3.290.0130.04314.91
5.3.280.0030.08714.82
5.3.270.0230.04714.82
5.3.260.0100.07314.86
5.3.250.0070.08014.74
5.3.240.0070.07714.80
5.3.230.0130.06014.73
5.3.220.0070.05014.83
5.3.210.0130.07014.73
5.3.200.0000.05714.82
5.3.190.0070.04314.79
5.3.180.0100.04014.70
5.3.170.0170.06014.69
5.3.160.0070.08014.81
5.3.150.0070.05314.72
5.3.140.0100.06314.70
5.3.130.0100.07014.72
5.3.120.0100.06714.73
5.3.110.0070.04714.71
5.3.100.0030.07714.29
5.3.90.0130.07014.16
5.3.80.0070.05714.11
5.3.70.0070.03714.15
5.3.60.0070.03314.23
5.3.50.0130.06314.20
5.3.40.0030.07714.21
5.3.30.0100.07014.16
5.3.20.0070.07013.88
5.3.10.0100.06013.78
5.3.00.0070.04313.73
5.2.170.0100.06011.39
5.2.160.0030.04711.25
5.2.150.0130.05711.27
5.2.140.0130.05311.39
5.2.130.0030.04011.23
5.2.120.0100.05711.16
5.2.110.0000.06711.34
5.2.100.0070.06011.27
5.2.90.0100.05011.29
5.2.80.0070.06011.23
5.2.70.0100.05711.12
5.2.60.0100.05711.11
5.2.50.0030.06011.10
5.2.40.0030.05311.25
5.2.30.0100.02711.20
5.2.20.0030.06311.19
5.2.10.0070.05711.13
5.2.00.0030.06010.84
5.1.60.0030.05310.78
5.1.50.0000.05310.78
5.1.40.0030.05310.78
5.1.30.0070.05710.78
5.1.20.0030.04710.78
5.1.10.0070.04010.78
5.1.00.0030.06010.78
5.0.50.0070.04310.78
5.0.40.0030.04710.78
5.0.30.0100.03010.78
5.0.20.0070.04010.78
5.0.10.0000.05010.78
5.0.00.0100.05710.78
4.4.90.0030.03310.78
4.4.80.0000.03710.78
4.4.70.0070.03310.78
4.4.60.0030.03710.78
4.4.50.0070.02310.78
4.4.40.0000.03010.78
4.4.30.0000.03710.78
4.4.20.0000.03310.78
4.4.10.0030.03310.78
4.4.00.0070.05010.78
4.3.110.0000.04010.78
4.3.100.0030.02710.78
4.3.90.0030.02010.78
4.3.80.0070.04710.78
4.3.70.0030.01710.78
4.3.60.0000.01710.78
4.3.50.0000.03710.78
4.3.40.0030.05010.78
4.3.30.0000.03010.78
4.3.20.0000.03710.78
4.3.10.0000.02710.78
4.3.00.0000.03710.78

preferences:
36.96 ms | 400 KiB | 5 Q