3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gmp_base_convert($numStr,$base){ $gnum = gmp_init($numStr); return gmp_strval($gnum,$base); } $binary = gmp_base_convert("-65",2); echo "$binary (binary)"; $i = intval($binary,2); $decimal = gmp_base_convert($i,10); echo "\n$decimal (decimal)"; //echo gmp_base_convert("0.5",16); echo "\n",gmp_base_convert("2A4",16);

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.40.0070.01519.22
8.3.30.0090.00619.14
8.3.20.0040.00420.54
8.3.10.0050.00320.65
8.3.00.0080.00020.59
8.2.170.0090.00622.96
8.2.160.0100.00722.33
8.2.150.0080.00024.18
8.2.140.0030.00724.66
8.2.130.0080.00020.73
8.2.120.0040.00426.35
8.2.110.0070.00422.33
8.2.100.0040.00818.05
8.2.90.0080.00019.30
8.2.80.0000.00818.00
8.2.70.0070.00317.50
8.2.60.0030.00518.29
8.2.50.0050.00318.09
8.2.40.0030.00520.84
8.2.30.0040.00419.74
8.2.20.0040.00417.88
8.2.10.0000.00718.27
8.2.00.0080.00018.16
8.1.270.0030.00624.09
8.1.260.0050.00328.09
8.1.250.0080.00028.09
8.1.240.0050.00520.68
8.1.230.0040.00817.95
8.1.220.0040.00417.90
8.1.210.0000.00818.77
8.1.200.0090.00017.48
8.1.190.0030.00617.38
8.1.180.0040.00418.10
8.1.170.0040.00418.78
8.1.160.0070.00020.82
8.1.150.0000.00819.04
8.1.140.0030.00519.67
8.1.130.0070.00017.84
8.1.120.0050.00217.66
8.1.110.0040.00417.60
8.1.100.0040.00417.57
8.1.90.0000.00717.51
8.1.80.0040.00417.63
8.1.70.0080.00017.48
8.1.60.0030.00517.71
8.1.50.0000.00817.59
8.1.40.0000.00717.78
8.1.30.0000.00817.84
8.1.20.0030.00617.84
8.1.10.0040.00417.79
8.1.00.0050.00317.69
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00718.68
8.0.270.0030.00517.48
8.0.260.0030.00317.48
8.0.250.0030.00317.25
8.0.240.0030.00617.25
8.0.230.0000.00717.11
8.0.220.0030.00417.14
8.0.210.0030.00317.00
8.0.200.0030.00317.06
8.0.190.0030.00517.21
8.0.180.0040.00417.14
8.0.170.0000.00717.04
8.0.160.0070.00317.11
8.0.150.0000.00717.07
8.0.140.0040.00417.12
8.0.130.0000.00513.32
8.0.120.0040.00417.11
8.0.110.0000.00817.15
8.0.100.0050.00317.20
8.0.90.0040.00417.09
8.0.80.0110.00417.08
8.0.70.0080.00016.93
8.0.60.0000.00717.14
8.0.50.0040.00417.23
8.0.30.0050.01417.27
8.0.20.0120.01017.47
8.0.10.0040.00417.27
8.0.00.0110.00716.97
7.4.330.0050.00016.83
7.4.320.0030.00316.73
7.4.300.0030.00316.67
7.4.290.0040.00416.71
7.4.280.0060.00316.70
7.4.270.0030.00316.57
7.4.260.0030.00316.67
7.4.250.0040.00416.63
7.4.240.0000.00716.74
7.4.230.0040.00416.69
7.4.220.0170.00716.81
7.4.210.0070.01016.69
7.4.200.0030.00316.86
7.4.160.0110.00616.68
7.4.150.0150.00317.40
7.4.140.0100.00817.86
7.4.130.0100.00816.83
7.4.120.0110.00916.72
7.4.110.0140.00416.88
7.4.100.0070.01816.58
7.4.90.0120.00816.80
7.4.80.0100.01019.39
7.4.70.0120.00916.70
7.4.60.0070.01016.66
7.4.50.0070.01116.67
7.4.40.0090.00916.70
7.4.30.0030.01316.71
7.4.00.0070.01115.41
7.3.330.0030.00313.31
7.3.320.0000.00513.28
7.3.310.0050.00316.58
7.3.300.0000.00816.56
7.3.290.0050.00216.50
7.3.280.0120.00716.61
7.3.270.0070.01017.40
7.3.260.0070.01716.60
7.3.250.0110.00716.53
7.3.240.0120.00716.67
7.3.230.0090.00916.74
7.3.210.0190.00316.70
7.3.200.0030.01416.73
7.3.190.0070.01016.85
7.3.180.0150.00616.43
7.3.170.0030.01216.63
7.3.160.0080.00816.66
7.2.330.0130.00416.78
7.2.320.0120.01016.59
7.2.310.0130.00916.95
7.2.300.0160.00616.64
7.2.290.0040.01216.45
7.2.60.0120.00617.05
7.2.50.0110.00617.17
7.2.00.0090.00619.55
7.1.200.0060.00616.10
7.1.70.0000.01117.35
7.1.60.0070.01719.19
7.1.50.0070.00717.32
7.1.00.0070.07322.55
7.0.200.0110.00017.21
7.0.60.0230.05321.66
7.0.50.0000.04318.21
7.0.40.0030.09020.18
7.0.30.0270.04020.46
7.0.20.0430.07720.35
7.0.10.0100.03720.38
7.0.00.0170.08020.34
5.6.280.0170.06021.14
5.6.210.0100.04020.68
5.6.200.0170.07018.42
5.6.190.0130.04721.02
5.6.180.0300.07720.75
5.6.170.0230.08020.71
5.6.160.0030.07320.69
5.6.150.0170.07718.37
5.6.140.0000.05018.48
5.6.130.0070.03718.28
5.6.120.0070.04021.25
5.6.110.0170.06321.28
5.6.100.0130.07721.23
5.6.90.0000.06021.29
5.6.80.0030.04020.67
5.5.350.0300.07020.43
5.5.340.0070.03718.08
5.5.330.0100.06720.56
5.5.320.0230.04320.47
5.5.310.0330.06720.53
5.5.300.0100.05018.24
5.5.290.0070.07318.21
5.5.280.0070.08720.89
5.5.270.0030.08321.02
5.5.260.0070.08721.03
5.5.250.0070.06720.64
5.5.240.0330.06720.20

preferences:
55.97 ms | 400 KiB | 5 Q