3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 129; $y = 1; $m = microtime(true); $y = 1 << ceil(log($x, 2)); echo (microtime(true)-$m), "\n\r"; $y = 1; $m = microtime(true); while ($y < $x) { $y = $y <<1; } echo microtime(true) - $m;

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.0040.00417.36
7.1.60.0100.01619.24
7.1.50.0160.01017.24
7.1.00.0030.07722.85
7.0.200.0070.00017.13
7.0.140.0070.07022.27
7.0.100.0100.03720.43
7.0.90.0070.04720.25
7.0.80.0100.04720.29
7.0.70.0100.08020.21
7.0.60.0200.07320.19
7.0.50.0170.07720.66
7.0.40.0030.09020.32
7.0.30.0070.08320.44
7.0.20.0170.07020.35
7.0.10.0170.08020.29
7.0.00.0070.08720.34
5.6.280.0070.07021.34
5.6.250.0100.06721.01
5.6.240.0000.05321.06
5.6.230.0170.05720.83
5.6.220.0070.07720.92
5.6.210.0070.08020.89
5.6.200.0170.07021.43
5.6.190.0100.06021.41
5.6.180.0070.04721.28
5.6.170.0200.07321.31
5.6.160.0100.08021.44
5.6.150.0100.07721.28
5.6.140.0130.08021.28
5.6.130.0030.05721.37
5.6.120.0100.04721.28
5.6.110.0070.08021.41
5.6.100.0130.04021.27
5.6.90.0030.07021.35
5.6.80.0000.09020.66
5.6.70.0070.07320.78
5.6.60.0070.07720.59
5.6.50.0070.05720.79
5.6.40.0100.06020.78
5.6.30.0030.08020.76
5.6.20.0000.08020.69
5.6.10.0070.07720.63
5.6.00.0070.04320.61
5.5.380.0130.04020.75
5.5.370.0070.04720.61
5.5.360.0100.04020.63
5.5.350.0130.07720.71
5.5.340.0070.08721.10
5.5.330.0070.08321.18
5.5.320.0070.07321.08
5.5.310.0030.05021.05
5.5.300.0130.05721.03
5.5.290.0070.06721.08
5.5.280.0100.07321.16
5.5.270.0200.05320.91
5.5.260.0100.04321.07
5.5.250.0030.08020.90
5.5.240.0170.07020.64
5.5.230.0230.06720.43
5.5.220.0130.06020.46
5.5.210.0070.06720.50
5.5.200.0070.08020.24
5.5.190.0030.06020.38
5.5.180.0030.06320.52
5.5.160.0230.06720.50
5.5.150.0070.08320.45
5.5.140.0070.08020.43
5.5.130.0030.07720.46
5.5.120.0170.04020.46
5.5.110.0030.08020.40
5.5.100.0200.06320.42
5.5.90.0070.07720.34
5.5.80.0130.07720.42
5.5.70.0070.08320.26
5.5.60.0000.08720.32
5.5.50.0070.05320.20
5.5.40.0070.08020.41
5.5.30.0030.08020.41
5.5.20.0100.07320.33
5.5.10.0030.05020.40
5.5.00.0030.08020.39
5.4.450.0170.07319.63
5.4.440.0170.07019.68
5.4.430.0070.05319.63
5.4.420.0130.07019.64
5.4.410.0070.04319.40
5.4.400.0270.05319.38
5.4.390.0070.04719.33
5.4.380.0100.07019.38
5.4.370.0070.07719.30
5.4.360.0070.07319.20
5.4.350.0000.06019.30
5.4.340.0070.05719.25
5.4.320.0030.08319.35
5.4.310.0130.07719.30
5.4.300.0070.05719.31
5.4.290.0170.05019.39
5.4.280.0100.04319.47
5.4.270.0100.07319.17
5.4.260.0070.07719.04
5.4.250.0130.07319.34
5.4.240.0030.05019.39
5.4.230.0070.07319.12
5.4.220.0070.05319.12
5.4.210.0100.07319.29
5.4.200.0100.06719.35
5.4.190.0070.06019.46
5.4.180.0130.05019.38
5.4.170.0000.06719.33
5.4.160.0130.07319.01
5.4.150.0130.07019.47
5.4.140.0030.04716.41
5.4.130.0000.07716.49
5.4.120.0030.04316.48
5.4.110.0070.06016.62
5.4.100.0100.06316.61
5.4.90.0130.06716.57
5.4.80.0070.03716.64
5.4.70.0070.07716.70
5.4.60.0130.06016.51
5.4.50.0070.07316.60
5.4.40.0100.06316.52
5.4.30.0000.07316.61
5.4.20.0100.03016.50
5.4.10.0070.07316.68
5.4.00.0100.04716.04
5.3.290.0100.07714.89
5.3.280.0070.07714.70
5.3.270.0070.06014.82
5.3.260.0100.06014.76
5.3.250.0100.06314.82
5.3.240.0030.07714.83
5.3.230.0100.07014.75
5.3.220.0100.06714.77
5.3.210.0070.07714.68
5.3.200.0030.07014.79
5.3.190.0100.06714.80
5.3.180.0100.06014.78
5.3.170.0030.07314.73
5.3.160.0100.06714.81
5.3.150.0070.06014.73
5.3.140.0070.06714.79
5.3.130.0100.07314.70
5.3.120.0000.06714.75
5.3.110.0070.07314.76
5.3.100.0000.07314.14
5.3.90.0070.07714.13
5.3.80.0100.05314.02
5.3.70.0100.07314.27
5.3.60.0000.08314.22
5.3.50.0030.06314.13
5.3.40.0000.08313.95
5.3.30.0070.07714.09
5.3.20.0070.07313.93
5.3.10.0130.06313.82
5.3.00.0030.07313.81
5.2.170.0100.05711.35
5.2.160.0030.06311.44
5.2.150.0000.07011.32
5.2.140.0030.03311.38
5.2.130.0030.06011.27
5.2.120.0030.06311.41
5.2.110.0070.05711.32
5.2.100.0130.02711.21
5.2.90.0100.05311.25
5.2.80.0100.06011.19
5.2.70.0100.05711.20
5.2.60.0100.06011.23
5.2.50.0100.05311.30
5.2.40.0100.02711.25
5.2.30.0170.04711.21
5.2.20.0030.06311.09
5.2.10.0030.05711.02
5.2.00.0030.04710.89
5.1.60.0030.05310.32
5.1.50.0070.04010.12
5.1.40.0030.05310.21
5.1.30.0030.06310.72
5.1.20.0000.05710.69
5.1.10.0070.04310.41
5.1.00.0030.05710.27
5.0.50.0030.0408.84
5.0.40.0070.0408.68
5.0.30.0030.0638.56
5.0.20.0070.0408.59
5.0.10.0000.0478.49
5.0.00.0000.0608.24
4.4.90.0030.0308.07
4.4.80.0100.0238.07
4.4.70.0000.0408.07
4.4.60.0070.0208.07
4.4.50.0000.0378.07
4.4.40.0000.0278.07
4.4.30.0070.0308.07
4.4.20.0030.0338.07
4.4.10.0000.0378.07
4.4.00.0030.0578.07
4.3.110.0070.0308.07
4.3.100.0030.0338.07
4.3.90.0000.0178.07
4.3.80.0000.0578.07
4.3.70.0000.0378.07
4.3.60.0030.0308.07
4.3.50.0030.0378.07
4.3.40.0000.0538.07
4.3.30.0030.0338.07
4.3.20.0000.0378.07
4.3.10.0000.0308.07
4.3.00.0000.0378.07

preferences:
32.15 ms | 401 KiB | 5 Q