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 = bcmod($q, $tobase); $s = base_convert($r, 10, $tobase) . $s; $q = bcdiv($q, $tobase, 0); } } else $s = $q; return $s; } $base16string = '5576F4CE68664C0000000000000000000000000'; $base36string = 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.0140.00718.20
8.3.50.0110.01121.95
8.3.40.0110.00418.83
8.3.30.0110.00418.55
8.3.20.0000.00720.20
8.3.10.0050.00321.86
8.3.00.0050.00321.04
8.2.180.0180.00016.75
8.2.170.0110.00422.96
8.2.160.0120.00319.26
8.2.150.0050.00224.18
8.2.140.0080.00024.66
8.2.130.0030.00522.25
8.2.120.0080.00026.35
8.2.110.0070.01119.39
8.2.100.0030.00917.91
8.2.90.0040.00419.20
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0000.00917.93
8.2.50.0000.00918.10
8.2.40.0050.00320.53
8.2.30.0030.00620.71
8.2.20.0030.00617.74
8.2.10.0040.00418.21
8.2.00.0000.00718.06
8.1.280.0030.01625.92
8.1.270.0060.00323.76
8.1.260.0080.00028.09
8.1.250.0000.00828.09
8.1.240.0070.00319.57
8.1.230.0060.00617.89
8.1.220.0090.00017.74
8.1.210.0030.00718.77
8.1.200.0060.00317.13
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0080.00018.65
8.1.160.0000.00720.88
8.1.150.0020.00518.79
8.1.140.0080.00019.65
8.1.130.0050.00217.69
8.1.120.0000.00717.39
8.1.110.0040.00417.54
8.1.100.0060.00317.35
8.1.90.0000.00817.42
8.1.80.0080.00017.50
8.1.70.0040.00417.34
8.1.60.0090.00317.62
8.1.50.0030.00617.45
8.1.40.0060.00617.57
8.1.30.0040.00417.57
8.1.20.0080.00017.71
8.1.10.0050.00317.41
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0060.00316.75
8.0.280.0070.00018.46
8.0.270.0000.00717.30
8.0.260.0030.00617.20
8.0.250.0040.00417.00
8.0.240.0030.00316.82
8.0.230.0030.00316.97
8.0.220.0000.00716.96
8.0.210.0000.00716.95
8.0.200.0030.00317.00
8.0.190.0040.00416.87
8.0.180.0040.00416.91
8.0.170.0080.00016.97
8.0.160.0040.00416.91
8.0.150.0040.00416.94
8.0.140.0070.00016.88
8.0.130.0000.00513.31
8.0.120.0040.00416.91
8.0.110.0000.00716.89
8.0.100.0040.00416.82
8.0.90.0000.00716.93
8.0.80.0060.01216.81
8.0.70.0060.00317.03
8.0.60.0030.00616.80
8.0.50.0080.00016.82
8.0.30.0090.00717.30
8.0.20.0100.00917.40
8.0.10.0040.00417.11
8.0.00.0120.00816.86
7.4.330.0030.00315.08
7.4.320.0000.00616.59
7.4.300.0000.00716.63
7.4.290.0030.00316.51
7.4.280.0040.00416.63
7.4.270.0070.00016.67
7.4.260.0030.00616.52
7.4.250.0020.00516.61
7.4.240.0070.00016.64
7.4.230.0070.00016.52
7.4.220.0100.00616.59
7.4.210.0080.00716.55
7.4.200.0040.00416.54
7.4.160.0030.01716.62
7.4.150.0120.01217.40
7.4.140.0150.00917.86
7.4.130.0070.01016.45
7.4.120.0070.01216.49
7.4.110.0070.01016.59
7.4.100.0130.01016.58
7.4.90.0070.01116.44
7.4.80.0030.01819.39
7.4.70.0040.01516.68
7.4.60.0100.00716.59
7.4.50.0000.01616.71
7.4.40.0070.01016.39
7.4.30.0060.01216.69
7.4.00.0070.01015.23
7.3.330.0000.00513.30
7.3.320.0030.00313.39
7.3.310.0000.00716.41
7.3.300.0000.00716.23
7.3.290.0040.00416.32
7.3.280.0050.01316.39
7.3.270.0140.00717.40
7.3.260.0110.00716.69
7.3.250.0080.01016.38
7.3.240.0120.01016.53
7.3.230.0030.01316.61
7.3.210.0070.01016.63
7.3.200.0070.01016.72
7.3.190.0060.01216.47
7.3.180.0150.00616.61
7.3.170.0140.00316.52
7.3.160.0040.01216.42
7.3.10.0100.00316.72
7.3.00.0050.00616.86
7.2.330.0060.01216.63
7.2.320.0090.00916.44
7.2.310.0050.01116.70
7.2.300.0120.00616.85
7.2.290.0060.00916.68
7.2.130.0060.00617.00
7.2.120.0040.00817.00
7.2.110.0050.00916.81
7.2.100.0050.00816.87
7.2.90.0080.00516.81
7.2.80.0040.00716.88
7.2.70.0050.01016.79
7.2.60.0060.00716.95
7.2.50.0030.00816.88
7.2.40.0090.00817.01
7.2.30.0120.00316.95
7.2.20.0060.00816.84
7.2.10.0070.00516.91
7.2.00.0070.00816.96
7.1.250.0060.00315.88
7.1.240.0120.00615.55
7.1.230.0090.00615.88
7.1.220.0070.00715.89
7.1.210.0090.00315.78
7.1.200.0090.00415.92
7.1.190.0040.00815.90
7.1.180.0080.00415.95
7.1.170.0030.00615.86
7.1.160.0040.01215.58
7.1.150.0140.00015.66
7.1.140.0030.01215.76
7.1.130.0040.00715.74
7.1.120.0100.00715.75
7.1.110.0070.01015.95
7.1.100.0070.00415.83
7.1.90.0080.00815.85
7.1.80.0080.00815.95
7.1.70.0060.00516.45
7.1.60.0090.01318.05
7.1.50.0080.00716.42
7.1.40.0050.00915.45
7.1.30.0130.00315.84
7.1.20.0050.01015.66
7.1.10.0050.01415.81
7.1.00.0090.03619.10
7.0.330.0110.00315.56
7.0.320.0080.00615.29
7.0.310.0120.00015.43
7.0.300.0030.00915.20
7.0.290.0090.00015.59
7.0.280.0100.00315.40
7.0.270.0090.00015.60
7.0.260.0110.00415.60
7.0.250.0030.00615.45
7.0.240.0060.00615.64
7.0.230.0100.00715.56
7.0.220.0120.00615.43
7.0.210.0120.00615.50
7.0.200.0100.00515.66
7.0.190.0050.00915.48
7.0.180.0080.00415.45
7.0.170.0080.00415.45
7.0.160.0030.01415.33
7.0.150.0080.01015.19
7.0.140.0060.00915.43
7.0.130.0090.00915.41
7.0.120.0060.01215.25
7.0.110.0030.01415.59
7.0.100.0060.00915.51
7.0.90.0030.01215.30
7.0.80.0030.01315.23
7.0.70.0080.00015.46
7.0.60.0020.04518.58
7.0.50.0040.03416.71
7.0.40.0180.03416.90
7.0.30.0170.03016.90
7.0.20.0320.02916.93
7.0.10.0080.04117.03
7.0.00.0230.03116.79
5.6.380.0000.01514.33
5.6.370.0090.00614.36
5.6.360.0060.01314.56
5.6.350.0100.00614.51
5.6.340.0030.01014.39
5.6.330.0080.00814.15
5.6.320.0100.00314.16
5.6.310.0160.00014.42
5.6.300.0040.01214.30
5.6.290.0040.01214.56
5.6.280.0100.03717.65
5.6.270.0100.01014.23
5.6.260.0100.00314.31
5.6.250.0110.00414.66
5.6.240.0090.00614.16
5.6.230.0090.00614.22
5.6.220.0070.00714.02
5.6.210.0030.03217.34
5.6.200.0030.04416.31
5.6.190.0190.03117.37
5.6.180.0170.03217.49
5.6.170.0180.03917.24
5.6.160.0180.03517.52
5.6.150.0220.03417.31
5.6.140.0140.03317.24
5.6.130.0130.03717.38
5.6.120.0050.04417.37
5.6.110.0080.03517.50
5.6.100.0140.03117.36
5.6.90.0180.03517.25
5.6.80.0270.02616.99
5.6.70.0120.02717.06
5.6.60.0170.02816.85
5.6.50.0170.03017.06
5.6.40.0240.02316.99
5.6.30.0160.03316.97
5.6.20.0100.03317.09
5.6.10.0170.03816.88
5.6.00.0290.02517.07
5.5.380.0040.00410.79
5.5.370.0030.01011.20
5.5.360.0000.00511.00
5.5.350.2210.02115.74
5.5.340.0100.03314.63
5.5.330.0110.03315.63
5.5.320.0160.03115.79
5.5.310.0170.03115.74
5.5.300.0170.03315.80
5.5.290.0170.03015.64
5.5.280.0110.03015.49
5.5.270.0070.03215.57
5.5.260.0180.03415.76
5.5.250.0210.02815.52
5.5.240.0180.03315.41
5.5.230.0080.02915.21
5.5.220.0080.02815.35
5.5.210.0190.02615.23
5.5.200.0190.02515.19
5.5.190.0250.02215.31
5.5.180.0190.02615.35
5.5.170.0070.00411.09
5.5.160.0120.03015.22
5.5.150.0030.03515.30
5.5.140.0100.04015.09
5.5.130.0180.04215.42
5.5.120.0170.03315.20
5.5.110.0180.03115.36
5.5.100.0300.02715.41
5.5.90.0220.02815.22
5.5.80.0130.03615.30
5.5.70.0190.02815.16
5.5.60.0180.02715.28
5.5.50.0200.02715.23
5.5.40.0170.02715.19
5.5.30.0100.03515.29
5.5.20.0150.03115.27
5.5.10.0140.03515.23
5.5.00.0230.02815.08

preferences:
96.95 ms | 401 KiB | 5 Q