3v4l.org

run code in 300+ PHP versions simultaneously
<?php function absolute(&$n){ return ((($n >> 31) ^ $n) - ($n >> 31)); } $start = microtime(true); for($i = 0; $i <= 5000000; $i++){ absolute($y); } $end = microtime(true); echo $end - $start;

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.0000.30116.91
7.1.60.0070.26317.18
7.1.50.0100.28017.02
7.1.40.0000.29716.61
7.1.30.0030.29016.61
7.1.20.0030.27816.69
7.1.10.0030.28916.32
7.1.00.0000.31916.73
7.0.200.0000.31916.60
7.0.190.0030.28516.87
7.0.180.0230.29516.42
7.0.170.0030.32716.22
7.0.160.0070.28216.32
7.0.150.0500.37016.32
7.0.140.0030.34316.22
7.0.130.0000.30016.64
7.0.120.0720.31516.54
7.0.110.0200.35016.46
7.0.100.0000.28116.45
7.0.90.0000.29116.26
7.0.80.0030.32316.42
7.0.70.0000.28116.34
7.0.60.0000.27316.22
7.0.50.0030.24816.43
7.0.40.0070.29116.22
7.0.30.0000.29616.22
7.0.20.0030.33816.22
7.0.10.0030.27116.22
7.0.00.0000.28316.22
5.6.300.0000.62620.64
5.6.290.0000.64620.92
5.6.280.0070.69920.86
5.6.270.0100.65321.07
5.6.260.0030.74821.04
5.6.250.0030.58720.88
5.6.240.0100.55620.98
5.6.230.0100.55220.80
5.6.220.0000.54920.96
5.6.210.0070.61621.00
5.6.200.0000.57821.00
5.6.190.0000.55221.05
5.6.180.0030.66021.00
5.6.170.0030.57720.77
5.6.160.0070.56420.95
5.6.150.0070.56720.81
5.6.140.0070.63621.03
5.6.130.0070.69520.88
5.6.120.1620.54220.86
5.6.110.0030.56420.82
5.6.100.0500.57820.92
5.6.90.0100.64520.91
5.6.80.0030.63420.32
5.6.70.0070.55320.42
5.6.60.0070.58920.14
5.6.50.0000.62320.22
5.6.40.0070.59720.13
5.6.30.0100.58620.21
5.6.20.0070.65320.31
5.6.10.0030.62720.39
5.6.00.0030.63420.16
5.5.380.0000.56517.65
5.5.370.0030.59717.55
5.5.360.0070.56717.52
5.5.350.0030.52817.57
5.5.340.0030.56518.01
5.5.330.1070.61018.07
5.5.320.0130.65718.09
5.5.310.0100.55818.09
5.5.300.0070.57818.03
5.5.290.0030.57018.13
5.5.280.0030.55018.02
5.5.270.0030.65917.70
5.5.260.0100.59018.08
5.5.250.0070.58417.83
5.5.240.0030.56917.51
5.5.230.0000.60717.38
5.5.220.0030.52317.40
5.5.210.0000.55517.41
5.5.200.0030.51417.19
5.5.190.0030.58517.45
5.5.180.0070.56017.45
5.5.160.0130.61417.38
5.5.150.1430.63217.44
5.5.140.0070.58217.53
5.5.130.0030.57917.05
5.5.120.0070.61917.18
5.5.110.0030.59417.07
5.5.100.0100.54617.35
5.5.90.0070.53317.09
5.5.80.0070.59217.13
5.5.70.0030.57717.38
5.5.60.0030.62017.13
5.5.50.0030.56617.37
5.5.40.0030.64117.38
5.5.30.0000.61817.25
5.5.20.0100.62417.41
5.5.10.0030.64116.94
5.5.00.0030.54817.09
5.4.450.0030.54519.41
5.4.440.0000.56119.30
5.4.430.0030.51819.48
5.4.420.0070.56119.55
5.4.410.0070.62219.11
5.4.400.0030.52819.20
5.4.390.0030.57318.98
5.4.380.0000.54518.92
5.4.370.0000.59319.07
5.4.360.0100.64118.98
5.4.350.0000.51919.17
5.4.340.0030.57119.18
5.4.320.0070.65719.07
5.4.310.0100.62118.95
5.4.300.0070.64518.97
5.4.290.0030.69719.09
5.4.280.0000.64219.07
5.4.270.0030.58319.18
5.4.260.0030.54619.11
5.4.250.0070.60519.05
5.4.240.0000.54519.07
5.4.230.0070.60419.11
5.4.220.0100.60918.97
5.4.210.0100.51819.07
5.4.200.0000.58419.03
5.4.190.0070.62619.05
5.4.180.0030.51519.13
5.4.170.0030.59718.92
5.4.160.0070.65119.15
5.4.150.0070.60919.21
5.4.140.0030.56216.54
5.4.130.0000.64216.68
5.4.120.0100.59316.46
5.4.110.0000.57016.77
5.4.100.0030.61216.72
5.4.90.0000.52416.41
5.4.80.0000.54016.69
5.4.70.0030.58116.70
5.4.60.0070.54716.46
5.4.50.0070.53016.38
5.4.40.0030.53316.72
5.4.30.0070.57616.55
5.4.20.0030.61116.71
5.4.10.0030.60416.61
5.4.00.0030.54016.22
5.3.290.0070.72616.22
5.3.280.0030.65516.22
5.3.270.0000.67416.22
5.3.260.0070.61716.22
5.3.250.0000.69616.22
5.3.240.0000.73916.22
5.3.230.0270.75116.22
5.3.220.0300.76416.22
5.3.210.0030.74716.22
5.3.200.0030.74416.22
5.3.190.0070.71416.22
5.3.180.0030.64816.22
5.3.170.0030.71916.22
5.3.160.1270.73316.22
5.3.150.0300.77716.22
5.3.140.0030.76116.22
5.3.130.0000.67616.22
5.3.120.0030.69016.22
5.3.110.0070.66616.22
5.3.100.0070.63816.22
5.3.90.0030.65516.22
5.3.80.0030.74416.22
5.3.70.0670.66616.22
5.3.60.0070.68116.22
5.3.50.0030.73216.22
5.3.40.0030.70216.22
5.3.30.0100.87116.22
5.3.20.0070.79716.22
5.3.10.0000.73416.22
5.3.00.0030.84816.22
5.2.170.0031.07016.22
5.2.160.0071.05416.22
5.2.150.0031.05216.22
5.2.140.0001.24516.22
5.2.130.0031.05516.22
5.2.120.0001.10316.22
5.2.110.0001.14016.22
5.2.100.0071.06816.22
5.2.90.0031.17116.22
5.2.80.0001.11716.22
5.2.70.0031.10816.22
5.2.60.0031.11916.22
5.2.50.0030.96716.22
5.2.40.0031.09116.22
5.2.30.0001.06116.22
5.2.20.0071.06316.22
5.2.10.0001.02216.22
5.2.00.0001.13316.22
5.1.60.0001.07516.22
5.1.50.0031.06716.22
5.1.40.0001.04916.22
5.1.30.0001.01616.22
5.1.20.0001.08216.22
5.1.10.0001.09016.22
5.1.00.0000.98116.22
5.0.50.0072.04316.22
5.0.40.0002.15616.22
5.0.30.0032.02114.88
5.0.20.0032.24514.88
5.0.10.0002.17114.88
5.0.00.0032.41114.88
4.4.90.0031.95516.22
4.4.80.0071.92416.22
4.4.70.0002.00016.22
4.4.60.0032.00116.22
4.4.50.0001.99816.22
4.4.40.0002.15316.22
4.4.30.0031.92516.22
4.4.20.0002.01316.22
4.4.10.0032.10416.22
4.4.00.0032.10616.22
4.3.110.0031.89714.88
4.3.100.0002.25814.88
4.3.90.0072.12914.88
4.3.80.0002.34414.88
4.3.70.0002.10914.88
4.3.60.0031.96414.88
4.3.50.0072.00214.88
4.3.40.0031.88314.88
4.3.30.1332.00814.88
4.3.20.0002.03614.88
4.3.10.0001.95314.88
4.3.00.0002.02114.88

preferences:
35.71 ms | 400 KiB | 5 Q