3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = 2; $two = 2; function power($nBase, $nPow){ if($nPow === 0) echo 1; else{ $i=1; $result=0; while($i<$nPow){ $nBase *= $nBase; $i++; } echo $result; } } power($one, $two);

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)
8.3.60.0040.01116.88
8.3.50.0100.00922.89
8.3.40.0070.00718.54
8.3.30.0120.00318.54
8.3.20.0080.00021.79
8.3.10.0030.00621.68
8.3.00.0040.00419.91
8.2.180.0070.00718.54
8.2.170.0150.00622.96
8.2.160.0150.00620.54
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0020.00522.30
8.2.120.0050.00326.35
8.2.110.0030.00622.12
8.2.100.0080.00418.22
8.2.90.0000.00819.30
8.2.80.0000.00917.97
8.2.70.0030.00617.50
8.2.60.0040.00418.05
8.2.50.0000.00818.10
8.2.40.0070.00022.31
8.2.30.0030.00621.05
8.2.20.0000.00717.73
8.2.10.0050.00317.92
8.2.00.0000.00718.06
8.1.280.0070.00725.92
8.1.270.0080.00023.59
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0030.00622.75
8.1.230.0110.00017.83
8.1.220.0050.00217.74
8.1.210.0030.00618.77
8.1.200.0100.00017.23
8.1.190.0000.00917.10
8.1.180.0040.00418.10
8.1.170.0050.00318.34
8.1.160.0030.00322.16
8.1.150.0000.00720.81
8.1.140.0040.00419.40
8.1.130.0030.00317.69
8.1.120.0070.00017.29
8.1.110.0000.00717.24
8.1.100.0030.00317.39
8.1.90.0040.00417.43
8.1.80.0000.00817.41
8.1.70.0000.00717.45
8.1.60.0050.00317.47
8.1.50.0000.00817.41
8.1.40.0050.00317.51
8.1.30.0060.00317.60
8.1.20.0050.00317.62
8.1.10.0050.00217.39
8.1.00.0040.00417.39
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00318.44
8.0.270.0070.00017.30
8.0.260.0030.00317.23
8.0.250.0030.00316.93
8.0.240.0000.01116.82
8.0.230.0000.00716.92
8.0.220.0030.00316.73
8.0.210.0000.00716.75
8.0.200.0030.00316.74
8.0.190.0060.00316.86
8.0.180.0060.00316.83
8.0.170.0050.00216.90
8.0.160.0030.00516.78
8.0.150.0070.00016.72
8.0.140.0030.00316.68
8.0.130.0000.00713.20
8.0.120.0030.00516.69
8.0.110.0000.00816.78
8.0.100.0040.00416.66
8.0.90.0040.00416.82
8.0.80.0030.01316.78
8.0.70.0000.00816.84
8.0.60.0040.00416.77
8.0.50.0000.00716.92
8.0.30.0100.00716.95
8.0.20.0100.01017.40
8.0.10.0040.00416.92
8.0.00.0190.00516.78
7.4.330.0020.00215.08
7.4.320.0000.00616.59
7.4.300.0060.00016.63
7.4.290.0000.01016.40
7.4.280.0060.00316.47
7.4.270.0070.00016.59
7.4.260.0080.00016.49
7.4.250.0030.00316.54
7.4.240.0040.00416.48
7.4.230.0030.00316.42
7.4.220.0040.01216.53
7.4.210.0070.01316.43
7.4.200.0030.00316.63
7.4.160.0110.00416.41
7.4.150.0090.00917.40
7.4.140.0150.00717.86
7.4.130.0170.00516.54
7.4.120.0150.00616.47
7.4.110.0060.01416.49
7.4.100.0100.01316.61
7.4.90.0100.00716.46
7.4.80.0120.01019.39
7.4.70.0120.00316.54
7.4.60.0060.01016.38
7.4.50.0030.00616.47
7.4.40.0060.01716.51
7.4.30.0100.00616.52
7.4.00.0030.01015.02
7.3.330.0020.00213.38
7.3.320.0030.00313.30
7.3.310.0070.00016.36
7.3.300.0000.00716.42
7.3.290.0030.00316.21
7.3.280.0070.01116.32
7.3.270.0100.01317.40
7.3.260.0100.01216.46
7.3.250.0090.00716.35
7.3.240.0070.01116.31
7.3.230.0140.01016.39
7.3.210.0100.00716.55
7.3.200.0080.01316.43
7.3.190.0090.00816.29
7.3.180.0080.00816.28
7.3.170.0110.00616.51
7.3.160.0110.00616.65
7.2.330.0030.01316.68
7.2.320.0090.01216.61
7.2.310.0080.00816.79
7.2.300.0120.00916.47
7.2.290.0060.01116.29
7.2.60.0000.01117.02
7.1.200.0000.01115.43
7.1.70.0000.00917.20
7.1.60.0040.01119.75
7.1.00.0100.07022.51
7.0.200.0080.00415.02
7.0.90.0670.00020.19
7.0.80.0670.00020.03
7.0.70.0700.00020.00
7.0.60.0870.00020.00
7.0.50.0670.00020.19
7.0.40.0700.00020.43
7.0.30.0700.00020.22
7.0.20.0700.00020.21
7.0.10.0670.00020.30
7.0.00.0730.00020.34
5.6.240.0900.00020.63
5.6.230.0700.00020.70
5.6.220.0900.00020.63
5.6.210.0670.00020.69
5.6.200.0700.00021.13
5.6.190.0670.00021.10
5.6.180.0670.00021.10
5.6.170.0670.00021.20
5.6.160.0730.00021.08
5.6.150.0630.00021.16
5.6.140.0670.00021.13
5.6.130.0700.00021.01
5.6.120.0730.00021.07
5.6.110.0870.00021.16
5.6.100.0670.00021.07
5.6.90.0700.00021.06
5.6.80.0700.00020.56
5.6.70.0670.00020.47
5.6.60.0630.00020.45
5.6.50.0630.00020.55
5.6.40.0630.00020.41
5.6.30.0630.00020.45
5.6.20.0630.00020.41
5.6.10.0670.00020.46
5.6.00.0600.00020.43

preferences:
57.2 ms | 401 KiB | 5 Q