3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bits32 = 32; $bits64 = 64; $N32 = 0xfffffffe; $N64 = 0xfffffffffffffffe; $result = -( pow(2, $bits32) - $N32 ); echo $result,"\n"; echo pow(2,$bits32) , "\n",$N32; $result = -( pow(2, $bits64) - $N64 ); echo "\n",$result,"\n"; echo pow(2,$bits64) - PHP_INT_MAX, "\n",$N64 - PHP_INT_MAX;

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.0090.00918.66
8.3.50.0100.00521.21
8.3.40.0000.01418.96
8.3.30.0060.00920.59
8.3.20.0050.00320.63
8.3.10.0030.00622.13
8.3.00.0060.00322.77
8.2.180.0080.01516.75
8.2.170.0110.00722.96
8.2.160.0100.00622.18
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0050.00320.98
8.2.110.0060.00322.41
8.2.100.0040.00818.03
8.2.90.0080.00019.33
8.2.80.0040.00419.71
8.2.70.0060.00317.75
8.2.60.0080.00018.02
8.2.50.0080.00018.07
8.2.40.0060.00318.46
8.2.30.0000.00719.73
8.2.20.0040.00417.80
8.2.10.0040.00417.93
8.2.00.0040.00417.95
8.1.280.0170.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00624.09
8.1.230.0060.00619.41
8.1.220.0040.00418.04
8.1.210.0050.00318.77
8.1.200.0060.00317.60
8.1.190.0040.00417.76
8.1.180.0000.00918.10
8.1.170.0080.00018.78
8.1.160.0040.00419.09
8.1.150.0030.00618.84
8.1.140.0000.00717.70
8.1.130.0070.00018.00
8.1.120.0000.00717.75
8.1.110.0000.00817.70
8.1.100.0000.00817.55
8.1.90.0000.00717.64
8.1.80.0040.00417.68
8.1.70.0030.00617.71
8.1.60.0050.00517.67
8.1.50.0000.00717.73
8.1.40.0030.00917.73
8.1.30.0000.00817.73
8.1.20.0040.00417.72
8.1.10.0040.00417.71
8.1.00.0030.00617.69
8.0.300.0080.00018.77
8.0.290.0040.00417.18
8.0.280.0070.00018.63
8.0.270.0070.00017.45
8.0.260.0000.00717.08
8.0.250.0040.00417.12
8.0.240.0030.00617.16
8.0.230.0030.00417.06
8.0.220.0000.00817.04
8.0.210.0030.00316.96
8.0.200.0060.00017.11
8.0.190.0060.00317.20
8.0.180.0000.00817.19
8.0.170.0030.00617.06
8.0.160.0000.00716.91
8.0.150.0000.00816.95
8.0.140.0050.00517.00
8.0.130.0000.00613.53
8.0.120.0070.00017.07
8.0.110.0080.00017.18
8.0.100.0000.00716.95
8.0.90.0070.00017.10
8.0.80.0090.00916.92
8.0.70.0040.00417.03
8.0.60.0000.00716.94
8.0.50.0000.00817.24
8.0.30.0080.01117.01
8.0.20.0080.01017.40
8.0.10.0030.00317.07
8.0.00.0080.01216.69
7.4.330.0030.00315.27
7.4.320.0060.00016.71
7.4.300.0030.00316.79
7.4.290.0030.00316.80
7.4.280.0040.00416.72
7.4.270.0030.00316.59
7.4.260.0000.00513.47
7.4.250.0040.00416.72
7.4.240.0020.00516.71
7.4.230.0070.00016.60
7.4.220.0290.02216.64
7.4.210.0100.00716.68
7.4.200.0050.00316.83
7.4.190.0070.00016.93
7.4.160.0180.00716.44
7.4.150.0090.00917.40
7.4.140.0090.01317.86
7.4.130.0060.01116.57
7.4.120.0120.00516.55
7.4.110.0170.00016.53
7.4.100.0030.01316.73
7.4.90.0090.00916.63
7.4.80.0210.01519.39
7.4.70.0060.01116.64
7.4.60.0120.01216.62
7.4.50.0030.00616.62
7.4.40.0070.01122.77
7.4.30.0040.01216.56
7.4.00.0060.00914.99
7.3.330.0000.00513.30
7.3.320.0060.00013.41
7.3.310.0030.00316.44
7.3.300.0000.00716.55
7.3.290.0090.00616.44
7.3.280.0090.00716.40
7.3.270.0040.01517.40
7.3.260.0170.00416.67
7.3.250.0070.01416.40
7.3.240.0070.01016.41
7.3.230.0070.01016.57
7.3.210.0060.01016.50
7.3.200.0150.00619.39
7.3.190.0100.00716.38
7.3.180.0100.00716.37
7.3.170.0130.00316.55
7.3.160.0130.00316.75
7.3.120.0070.00714.81
7.2.330.0060.01316.68
7.2.320.0120.01016.79
7.2.310.0000.01716.64
7.2.300.0150.00616.71
7.2.290.0070.01016.56
7.2.60.0000.01016.71
7.2.00.0040.00819.12
7.1.200.0040.00415.93
7.1.100.0030.01018.45
7.1.70.0100.00016.98
7.1.60.0070.01719.17
7.1.50.0100.01416.66
7.1.00.0130.06022.45
7.0.200.0030.00716.57
7.0.140.0030.07722.21
7.0.60.0300.08020.07
7.0.50.0030.06717.98
7.0.40.0030.05019.96
7.0.30.0330.05320.29
7.0.20.0130.04320.25
7.0.10.0100.08320.08
7.0.00.0070.05720.22
5.6.280.0170.05721.22
5.6.210.0000.09020.79
5.6.200.0130.06318.28
5.6.190.0100.03720.36
5.6.180.0230.03720.35
5.6.170.0300.07320.63
5.6.160.0030.07320.84
5.6.150.0130.06318.22
5.6.140.0070.04018.31
5.6.130.0070.05318.34
5.6.120.0070.04721.08
5.6.110.0100.08321.27
5.6.100.0130.07721.14
5.6.90.0330.06321.08
5.6.80.0070.03720.50
5.5.350.0200.06720.48
5.5.340.0000.04017.98
5.5.330.0070.07320.45
5.5.320.0400.07020.45
5.5.310.0200.08020.34
5.5.300.0200.06718.11
5.5.290.0000.09018.09
5.5.280.0030.08321.03
5.5.270.0070.08021.06
5.5.260.0100.05320.95
5.5.250.0070.06320.85
5.5.240.0130.05020.27
5.4.450.0070.04319.41
5.4.440.0700.05019.57
5.4.430.1500.04319.54
5.4.420.1600.04019.38
5.4.410.1700.03718.97
5.4.400.1800.04019.09
5.4.390.1530.03719.22
5.4.380.1830.04719.31
5.4.370.1700.03318.78
5.4.360.0830.04018.88
5.4.350.0170.07019.09
5.4.340.0100.07719.24
5.4.320.1630.02718.81
5.4.310.1800.03319.25
5.4.300.1100.05019.25
5.4.290.0100.03719.23
5.4.280.0030.07719.13
5.4.270.0830.06018.77
5.4.260.1370.03319.07
5.4.250.1530.03319.21
5.4.240.1600.03718.88
5.4.230.1600.04019.08
5.4.220.1600.03719.08
5.4.210.1670.03319.30
5.4.200.0130.07319.08
5.4.190.0000.05019.24
5.4.180.0100.03718.89
5.4.170.0000.07719.23
5.4.160.0030.04018.89
5.4.150.0670.05319.04
5.4.140.1330.04016.28
5.4.130.1770.04316.32
5.4.120.1600.04016.33
5.4.110.1800.04316.44
5.4.100.1730.04716.55
5.4.90.1430.03316.18
5.4.80.1900.03716.45
5.4.70.1800.03316.41
5.4.60.1870.04316.52
5.4.50.1800.04016.52
5.4.40.1830.04016.40
5.4.30.1830.04316.16
5.4.20.1800.04716.31
5.4.10.1570.03716.52
5.4.00.0130.06315.76
5.3.290.0030.04714.75
5.3.280.1670.04314.49
5.3.270.1530.04314.55
5.3.260.1530.03314.44
5.3.250.0000.07314.52
5.3.240.0000.04014.70
5.3.230.0000.04014.55
5.3.220.1100.05014.52
5.3.210.1670.04314.44
5.3.200.1700.04014.61
5.3.190.1630.04014.41
5.3.180.1600.03714.55
5.3.170.1900.04714.55
5.3.160.1670.04014.45
5.3.150.1870.04314.51
5.3.140.1570.04014.49
5.3.130.1670.04014.52
5.3.120.0030.03714.49
5.3.110.0070.07314.46
5.3.100.0000.04013.93
5.3.90.1500.05013.96
5.3.80.1900.04013.90
5.3.70.0070.04714.11
5.3.60.0070.03313.88
5.3.50.0070.03713.72
5.3.40.1670.03313.84
5.3.30.1600.03313.88
5.3.20.0070.03713.61
5.3.10.0070.04313.63
5.3.00.0030.04013.43
5.2.170.1070.04311.14
5.2.160.1530.03310.98
5.2.150.1400.03011.05
5.2.140.1130.04311.16
5.2.130.0170.04011.04
5.2.120.0000.05010.96
5.2.110.0030.04311.02
5.2.100.1270.02711.26
5.2.90.0070.03311.27
5.2.80.0030.03011.02
5.2.70.0000.03010.98
5.2.60.0770.03010.98
5.2.50.1300.03010.99
5.2.40.1230.03011.08
5.2.30.0400.03310.89
5.2.20.0030.02710.92
5.2.10.0000.03011.00
5.2.00.0000.04010.79
5.1.60.0930.0209.96
5.1.50.1170.0339.97
5.1.40.0070.0239.90
5.1.30.0000.05710.41
5.1.20.0070.04710.49
5.1.10.0070.04010.04
5.1.00.0500.03710.14
5.0.50.0000.0238.50
5.0.40.0000.0378.36
5.0.30.0030.0338.44
5.0.20.0000.0278.17
5.0.10.0000.0438.25
5.0.00.0000.0308.14
4.4.90.0030.0278.06
4.4.80.0030.0138.06
4.4.70.0170.0178.06
4.4.60.0070.0178.06
4.4.50.0030.0138.06
4.4.40.0000.0578.06
4.4.30.0070.0178.06
4.4.20.0030.0208.06
4.4.10.0000.0178.06
4.4.00.0030.0408.06
4.3.110.0070.0108.06
4.3.100.0470.0178.06
4.3.90.0000.0208.06
4.3.80.0030.0478.06
4.3.70.0000.0178.06
4.3.60.0000.0138.06
4.3.50.0030.0208.06
4.3.40.0030.0238.06
4.3.30.0000.0338.06
4.3.20.0000.0178.06
4.3.10.0000.0378.06
4.3.00.0000.0178.06

preferences:
48.16 ms | 401 KiB | 5 Q