3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str_baseconvert($str, $frombase=16, $tobase=36) { $str = trim($str); if (intval($frombase) != 10) { $len = strlen($str); $q = 0; for ($i=0; $i<$len; $i++) { $r = base_convert($str[$i], $frombase, 10); $q = bcadd(bcmul($q, $frombase), $r); } } else $q = $str; if (intval($tobase) != 10) { $s = ''; while (bccomp($q, '0', 0) > 0) { $r = intval(bcmod($q, $tobase)); $s = base_convert($r, 10, $tobase) . $s; $q = bcdiv($q, $tobase, 0); } } else $s = $q; return $s; } $base16string = '5576F4CE68664C0000000000000000000000000'; $bse36string = str_baseconvert($base16string,16,36); echo $base36string;

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.0100.01018.33
8.3.50.0120.00822.11
8.3.40.0070.00718.92
8.3.30.0000.01418.89
8.3.20.0000.00720.20
8.3.10.0070.00021.73
8.3.00.0040.00420.96
8.2.180.0110.00416.75
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00422.13
8.2.120.0000.00826.35
8.2.110.0060.00322.23
8.2.100.0000.01220.89
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00918.04
8.2.50.0050.00318.10
8.2.40.0030.00620.65
8.2.30.0070.00320.66
8.2.20.0000.00817.75
8.2.10.0040.00418.16
8.2.00.0000.00718.20
8.1.280.0110.00725.92
8.1.270.0080.00023.97
8.1.260.0040.00428.09
8.1.250.0040.01128.09
8.1.240.0090.00023.83
8.1.230.0110.00019.16
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0080.00017.25
8.1.180.0000.00818.10
8.1.170.0050.00318.62
8.1.160.0040.00420.81
8.1.150.0040.00418.91
8.1.140.0040.00419.59
8.1.130.0070.00017.70
8.1.120.0000.00717.54
8.1.110.0040.00417.40
8.1.100.0050.00317.52
8.1.90.0080.00017.41
8.1.80.0070.00017.38
8.1.70.0030.00317.37
8.1.60.0070.00417.55
8.1.50.0000.00817.44
8.1.40.0100.00017.45
8.1.30.0000.00917.60
8.1.20.0000.00717.68
8.1.10.0040.00417.39
8.1.00.0060.00317.46
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0000.00718.39
8.0.270.0040.00417.22
8.0.260.0040.00717.12
8.0.250.0000.00717.12
8.0.240.0040.00417.07
8.0.230.0000.00716.91
8.0.220.0070.00017.00
8.0.210.0070.00016.88
8.0.200.0030.00317.06
8.0.190.0040.00416.98
8.0.180.0060.00317.01
8.0.170.0040.00416.98
8.0.160.0040.00417.06
8.0.150.0000.00716.79
8.0.140.0030.00316.97
8.0.130.0000.00513.30
8.0.120.0030.00616.97
8.0.110.0080.00016.98
8.0.100.0040.00417.02
8.0.90.0050.00216.88
8.0.80.0060.01216.99
8.0.70.0040.00416.92
8.0.60.0030.00516.90
8.0.50.0040.00416.93
8.0.30.0150.00617.03
8.0.20.0110.00817.40
8.0.10.0080.00017.00
8.0.00.0120.01016.91
7.4.330.0000.00515.08
7.4.320.0030.00316.66
7.4.300.0000.00616.57
7.4.290.0070.00016.65
7.4.280.0050.00316.51
7.4.270.0000.00716.45
7.4.260.0060.00316.66
7.4.250.0030.00616.45
7.4.240.0000.00716.43
7.4.230.0070.00016.66
7.4.220.0100.00716.61
7.4.210.0080.00916.69
7.4.200.0040.00416.53
7.4.160.0080.01116.61
7.4.150.0100.01217.40
7.4.140.0140.00917.86
7.4.130.0070.01016.68
7.4.120.0060.01316.60
7.4.110.0130.00316.71
7.4.100.0160.00716.52
7.4.90.0090.00916.63
7.4.80.0080.00819.39
7.4.70.0130.00716.55
7.4.60.0060.00916.78
7.4.50.0000.01916.39
7.4.40.0100.00716.58
7.4.30.0070.01016.34
7.4.00.0070.00715.09
7.3.330.0000.00513.23
7.3.320.0030.00313.37
7.3.310.0080.00016.55
7.3.300.0000.00716.49
7.3.290.0040.00416.32
7.3.280.0100.00716.44
7.3.270.0060.01217.40
7.3.260.0110.00716.36
7.3.250.0100.00716.51
7.3.240.0130.00316.52
7.3.230.0100.00716.41
7.3.210.0060.01216.67
7.3.200.0090.00916.46
7.3.190.0180.00016.52
7.3.180.0060.00916.49
7.3.170.0110.00716.62
7.3.160.0100.00616.44
7.3.10.0040.00816.77
7.3.00.0060.00616.81
7.2.330.0160.00316.68
7.2.320.0070.01116.75
7.2.310.0140.00816.78
7.2.300.0100.01316.57
7.2.290.0130.01016.77
7.2.130.0060.00916.95
7.2.120.0000.01216.96
7.2.110.0060.00616.69
7.2.100.0030.01016.77
7.2.90.0070.00716.96
7.2.80.0060.00616.78
7.2.70.0030.00616.69
7.2.60.0030.01117.05
7.2.50.0040.00816.72
7.2.40.0000.01217.11
7.2.30.0120.00317.12
7.2.20.0140.00017.16
7.2.10.0030.01316.93
7.2.00.0070.00618.01
7.1.250.0000.01015.85
7.1.200.0080.00415.96
7.1.100.0000.01017.96
7.1.70.0030.00516.93
7.1.60.0110.01520.41
7.1.50.0090.01216.86
7.1.00.0000.08022.39
7.0.200.0060.00616.00
7.0.60.0030.03021.84
7.0.50.0100.08017.87
7.0.40.0200.05720.21
7.0.30.0070.06320.27
7.0.20.0170.06020.26
7.0.10.0170.06020.23
7.0.00.0200.05320.21
5.6.280.0070.07020.83
5.6.210.0030.06020.63
5.6.200.0030.04018.14
5.6.190.0170.06320.61
5.6.180.0070.06320.44
5.6.170.0070.07020.55
5.6.160.0100.06320.53
5.6.150.0100.06320.37
5.6.140.0100.06320.36
5.6.130.0170.06020.35
5.6.120.0100.06020.30
5.6.110.0270.05320.58
5.6.100.0300.05720.28
5.6.90.0170.06720.34
5.6.80.0270.05319.80
5.6.70.0130.05319.81
5.6.60.0100.06319.71
5.6.50.0300.06319.69
5.6.40.0270.06019.80
5.6.30.0370.05319.95
5.6.20.0330.05019.63
5.6.10.0370.06719.73
5.6.00.0270.05719.76
5.5.350.4400.03320.45
5.5.340.0100.04317.95
5.5.330.0100.06320.36
5.5.320.0100.05720.28
5.5.310.0270.05020.40
5.5.300.0200.05020.21
5.5.290.0130.06020.00
5.5.280.0130.06720.24
5.5.270.0230.06320.00
5.5.260.0300.05720.20
5.5.250.0370.04720.02
5.5.240.0100.06719.58
5.5.230.0100.05319.54
5.5.220.0100.05719.49
5.5.210.0270.05019.45
5.5.200.0330.04319.60
5.5.190.0500.04019.55
5.5.180.0330.05319.56
5.5.160.0300.05719.56
5.5.150.0370.05019.56
5.5.140.0530.03019.45
5.5.130.0330.05719.54
5.5.120.0400.05019.34
5.5.110.0370.06019.52
5.5.100.0370.05319.51
5.5.90.0400.05019.42
5.5.80.0300.05019.46
5.5.70.0270.05319.48
5.5.60.0300.05719.24
5.5.50.0230.05719.43
5.5.40.0200.05719.41
5.5.30.0200.06019.46
5.5.20.0300.05319.38
5.5.10.0270.05319.36
5.5.00.0330.05719.39

preferences:
56.51 ms | 401 KiB | 5 Q