3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uid=8193; function q4() { global $uid; srand($uid);rand(1,100);rand(1,100);rand(1,100);rand(1,20);rand(100,1000); $h=rand(10,1000); $n=rand(1,10); $r=$h+1;$k=0; for($i=1;$i<=$n;$i++) { $r=ceil($r/2); $k++; } $k+=$r-1; return $k; } echo q4();

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.0060.01314.96
7.3.120.0140.00414.86
7.3.110.0090.00914.84
7.3.100.0030.01514.78
7.3.90.0030.01014.87
7.3.80.0150.00014.99
7.3.70.0040.01114.80
7.3.60.0030.00914.95
7.3.50.0110.00414.80
7.3.40.0060.01014.88
7.3.30.0090.00314.72
7.3.20.0100.00716.78
7.3.10.0040.00716.68
7.3.00.0070.01016.87
7.2.250.0090.00915.26
7.2.240.0170.00315.01
7.2.230.0040.01215.14
7.2.220.0090.00615.06
7.2.210.0040.01115.05
7.2.200.0060.00615.17
7.2.190.0030.01015.09
7.2.180.0030.01014.75
7.2.170.0090.00315.09
7.2.00.0030.01419.51
7.1.330.0040.01215.88
7.1.320.0030.00615.98
7.1.310.0030.01315.85
7.1.300.0070.00715.77
7.1.290.0070.00715.85
7.1.280.0040.01115.78
7.1.270.0060.00615.86
7.1.260.0000.00915.92
7.1.70.0000.00917.09
7.1.60.0140.01019.46
7.1.50.0030.00916.93
7.1.00.0070.07322.37
7.0.200.0000.01116.56
7.0.140.0030.07321.98
7.0.60.0070.07020.00
7.0.50.0030.04017.86
7.0.40.0130.08020.21
7.0.30.0200.04320.08
7.0.20.0370.08020.23
7.0.10.0330.07020.07
7.0.00.0100.08020.23
5.6.280.0030.07321.13
5.6.210.0070.05020.61
5.6.200.0070.08718.17
5.6.190.0100.08020.61
5.6.180.0230.05320.46
5.6.170.0070.05020.62
5.6.160.0100.04720.57
5.6.150.0070.08018.25
5.6.140.0070.05018.29
5.6.130.0070.04018.18
5.6.120.0130.07720.97
5.6.110.0070.06021.01
5.6.100.0130.07320.98
5.6.90.0200.03720.97
5.6.80.0100.07020.41
5.6.70.3030.03020.39
5.5.350.0100.07320.45
5.5.340.0100.07718.02
5.5.330.0200.07020.57
5.5.320.0270.05720.51
5.5.310.0270.06020.23
5.5.300.0070.05318.06
5.5.290.0030.08718.07
5.5.280.0030.04320.80
5.5.270.0070.04020.77
5.5.260.0100.07020.75
5.5.250.0170.04320.71
5.5.240.0030.05720.07
5.4.450.0470.04719.32
5.4.440.0700.05019.40
5.4.430.0370.04019.27
5.4.420.0030.06019.38
5.4.410.0100.04019.02
5.4.400.0100.03019.23
5.4.390.0170.03719.06
5.4.380.0070.03319.13
5.4.370.0100.03019.31
5.4.360.0130.02719.07
5.4.350.0170.05019.20
5.4.340.0130.04719.22
5.4.320.0100.04019.22
5.4.310.0170.03319.04
5.4.300.0130.03319.06
5.4.290.0100.04319.21
5.4.280.0130.04719.22
5.4.270.0030.03719.07
5.4.260.0170.03019.06
5.4.250.0100.03719.21
5.4.240.0100.03718.95
5.4.230.0070.04019.16
5.4.220.0170.04718.95
5.4.210.0100.03719.26
5.4.200.0170.03019.20
5.4.190.0130.05019.21
5.4.180.0170.05019.15
5.4.170.0170.03318.95
5.4.160.0100.04319.20
5.4.150.0100.04018.95
5.4.140.0170.04716.38
5.4.130.0170.03016.36
5.4.120.0100.03716.37
5.4.110.0130.04016.61
5.4.100.0100.03316.56
5.4.90.0100.03316.24
5.4.80.0100.05316.51
5.4.70.0030.03716.38
5.4.60.0070.03316.14
5.4.50.0170.04316.43
5.4.40.0130.03316.50
5.4.30.0030.03716.17
5.4.20.0070.03716.51
5.4.10.0100.05316.52
5.4.00.0170.04015.96
5.3.290.0100.04015.70
5.3.280.0130.04315.70
5.3.270.0200.04315.70
5.3.260.0170.03015.70
5.3.250.0070.03715.70
5.3.240.0030.04315.70
5.3.230.0130.03315.70
5.3.220.0170.05715.70
5.3.210.0100.03715.70
5.3.200.0070.03315.70
5.3.190.0000.04715.70
5.3.180.0130.03315.70
5.3.170.0100.03715.70
5.3.160.0170.05715.70
5.3.150.0130.05015.70
5.3.140.0000.04015.70
5.3.130.0130.04715.70
5.3.120.0030.03715.70
5.3.110.0070.05315.70
5.3.100.0230.05315.70
5.3.90.0130.05315.70
5.3.80.0130.03315.70
5.3.70.0130.03715.70
5.3.60.0070.03315.70
5.3.50.0070.03315.70
5.3.40.0000.03715.70
5.3.30.0170.03015.70
5.3.20.0200.04015.70
5.3.10.0170.06315.70
5.3.00.0100.04715.70
5.2.170.0000.03015.70
5.2.160.0000.02715.70
5.2.150.0070.03715.70
5.2.140.0100.03715.70
5.2.130.0100.03315.70
5.2.120.0070.03315.70
5.2.110.0070.04015.70
5.2.100.0000.02315.70
5.2.90.0130.02015.70
5.2.80.0070.02315.70
5.2.70.0070.03315.70
5.2.60.0070.03315.70
5.2.50.0100.02715.70
5.2.40.0030.03315.70
5.2.30.0070.03315.70
5.2.20.0100.02315.70
5.2.10.0030.02715.75
5.2.00.0030.03715.75
5.1.60.0070.02715.75
5.1.50.0000.02715.75
5.1.40.0070.02715.75
5.1.30.0000.02715.75
5.1.20.0000.02715.75
5.1.10.0070.02315.75
5.1.00.0000.03015.75
5.0.50.0000.02015.75
5.0.40.0000.01715.75
5.0.30.0000.03015.75
5.0.20.0000.02715.75
5.0.10.0030.01315.75
5.0.00.0070.03015.75
4.4.90.0030.02315.70
4.4.80.0000.01315.70
4.4.70.0100.00715.70
4.4.60.0000.01315.75
4.4.50.0000.01715.75
4.4.40.0000.03315.75
4.4.30.0070.03315.75
4.4.20.0030.01715.75
4.4.10.0000.02015.75
4.4.00.0000.02715.75
4.3.110.0000.01315.75
4.3.100.0000.02315.75
4.3.90.0000.01315.75
4.3.80.0300.02015.75
4.3.70.0200.01715.79
4.3.60.0130.01715.79
4.3.50.0100.01015.79
4.3.40.0130.02015.79
4.3.30.0130.02315.79
4.3.20.0130.01315.79
4.3.10.0130.01315.79
4.3.00.0070.01715.79

preferences:
28.79 ms | 400 KiB | 5 Q