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'; $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.0200.00318.42
8.3.50.0120.00917.85
8.3.40.0090.00618.70
8.3.30.0000.01418.70
8.3.20.0050.00220.30
8.3.10.0040.00421.91
8.3.00.0040.00420.77
8.2.180.0120.00316.50
8.2.170.0120.00322.96
8.2.160.0070.00719.20
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0080.00022.30
8.2.120.0070.00026.35
8.2.110.0070.00320.38
8.2.100.0120.00017.72
8.2.90.0030.00619.28
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00418.04
8.2.50.0000.00818.10
8.2.40.0040.00420.58
8.2.30.0050.00520.54
8.2.20.0000.00717.77
8.2.10.0040.00418.04
8.2.00.0040.00418.03
8.1.280.0110.00725.92
8.1.270.0040.00423.87
8.1.260.0040.00428.09
8.1.250.0030.01028.09
8.1.240.0090.00023.59
8.1.230.0060.00622.25
8.1.220.0000.00917.78
8.1.210.0050.00318.77
8.1.200.0000.00917.25
8.1.190.0040.00417.23
8.1.180.0030.00518.10
8.1.170.0040.00418.53
8.1.160.0000.00720.79
8.1.150.0070.00018.79
8.1.140.0020.00519.48
8.1.130.0040.00417.57
8.1.120.0000.00717.40
8.1.110.0030.00617.43
8.1.100.0030.00517.49
8.1.90.0000.00817.39
8.1.80.0040.00417.49
8.1.70.0040.00417.34
8.1.60.0030.00717.58
8.1.50.0030.00617.43
8.1.40.0000.00917.43
8.1.30.0050.00317.61
8.1.20.0030.00617.61
8.1.10.0030.00517.37
8.1.00.0000.00817.46
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.39
8.0.270.0080.00017.21
8.0.260.0000.00717.29
8.0.250.0000.00716.96
8.0.240.0040.00417.03
8.0.230.0040.00417.01
8.0.220.0030.00316.89
8.0.210.0000.00716.81
8.0.200.0000.00816.96
8.0.190.0030.00516.89
8.0.180.0040.00416.92
8.0.170.0000.00816.84
8.0.160.0000.00716.95
8.0.150.0040.00816.77
8.0.140.0040.00416.80
8.0.130.0000.00613.38
8.0.120.0040.00416.75
8.0.110.0050.00316.93
8.0.100.0070.00016.96
8.0.90.0040.00416.91
8.0.80.0070.01116.95
8.0.70.0000.00716.99
8.0.60.0020.00516.82
8.0.50.0040.00416.95
8.0.30.0060.01017.02
8.0.20.0120.00917.40
8.0.10.0040.00416.84
8.0.00.0120.00816.88
7.4.330.0030.00315.08
7.4.320.0070.00016.65
7.4.300.0030.00316.45
7.4.290.0000.00716.59
7.4.280.0000.00816.49
7.4.270.0030.00516.64
7.4.260.0000.00816.52
7.4.250.0000.00716.49
7.4.240.0030.00416.50
7.4.230.0070.00016.68
7.4.220.0060.01016.48
7.4.210.0040.01316.64
7.4.200.0050.00316.65
7.4.160.0000.02016.47
7.4.150.0100.01017.40
7.4.140.0100.01217.86
7.4.130.0130.00316.40
7.4.120.0040.01716.58
7.4.110.0120.00416.46
7.4.100.0110.01516.42
7.4.90.0100.01416.56
7.4.80.0060.01319.39
7.4.70.0030.01616.53
7.4.60.0090.00716.52
7.4.50.0040.00916.42
7.4.40.0060.01016.47
7.4.30.0040.01416.57
7.4.10.0070.01414.93
7.4.00.0070.00914.98
7.3.330.0000.00613.45
7.3.320.0040.00413.43
7.3.310.0050.00316.49
7.3.300.0000.00816.26
7.3.290.0000.00716.40
7.3.280.0120.00716.31
7.3.270.0090.00917.40
7.3.260.0110.01116.39
7.3.250.0110.01116.55
7.3.240.0100.01016.48
7.3.230.0110.00616.39
7.3.210.0140.00416.53
7.3.200.0070.01116.32
7.3.190.0100.00616.52
7.3.180.0080.00816.38
7.3.170.0160.00816.56
7.3.160.0110.00516.50
7.3.130.0070.01114.86
7.3.120.0160.00315.14
7.3.110.0040.01214.86
7.3.100.0100.00715.02
7.3.90.0070.00714.74
7.3.80.0060.00914.77
7.3.70.0030.01015.08
7.3.60.0100.00314.88
7.3.50.0140.00314.82
7.3.40.0030.01314.73
7.3.30.0000.01014.86
7.3.20.0000.01216.61
7.3.10.0030.01016.81
7.3.00.0000.00916.67
7.2.330.0100.01416.48
7.2.320.0040.01416.83
7.2.310.0100.00716.90
7.2.300.0100.01416.44
7.2.290.0060.01516.70
7.2.260.0030.01715.20
7.2.250.0030.01615.23
7.2.240.0090.00615.25
7.2.230.0040.01114.98
7.2.220.0070.00715.17
7.2.210.0030.01015.19
7.2.200.0120.00315.32
7.2.190.0070.00715.04
7.2.180.0000.01314.90
7.2.170.0040.00814.97
7.2.160.0050.00514.92
7.2.150.0030.01017.01
7.2.140.0030.00817.04
7.2.130.0100.00317.02
7.2.120.0090.00616.81
7.2.110.0100.00017.02
7.2.100.0090.00016.98
7.2.90.0040.00816.74
7.2.80.0070.00716.81
7.2.70.0100.00616.84
7.2.60.0100.00316.97
7.2.50.0060.00316.71
7.2.40.0150.00016.81
7.2.30.0110.00416.82
7.2.20.0090.00917.13
7.2.10.0080.00416.96
7.2.00.0060.01316.68
7.1.330.0090.00615.78
7.1.320.0100.00715.48
7.1.310.0130.00315.84
7.1.300.0090.00616.01
7.1.290.0000.01815.77
7.1.280.0080.00415.87
7.1.270.0030.00615.86
7.1.260.0040.01216.01
7.1.250.0030.00615.86
7.1.240.0070.00715.77
7.1.230.0070.00315.61
7.1.220.0040.00815.93
7.1.210.0030.00715.75
7.1.200.0030.00715.58
7.1.190.0070.00715.81
7.1.180.0060.00915.92
7.1.170.0000.01315.65
7.1.160.0060.00915.93
7.1.150.0100.00715.94
7.1.140.0060.00615.75
7.1.130.0060.01015.76
7.1.120.0030.01615.71
7.1.110.0070.01415.95
7.1.100.0040.00916.99
7.1.90.0110.00315.93
7.1.80.0000.01415.80
7.1.70.0020.01116.43
7.1.60.0100.01318.15
7.1.50.0050.01416.49
7.1.40.0060.00915.45
7.1.30.0080.00815.82
7.1.20.0030.01415.52
7.1.10.0040.01215.87
7.1.00.0050.04218.94
7.0.330.0040.00415.19
7.0.320.0080.00815.39
7.0.310.0100.00715.34
7.0.300.0040.00715.46
7.0.290.0070.00715.59
7.0.280.0100.00315.47
7.0.270.0000.00915.45
7.0.260.0080.00415.39
7.0.250.0100.01015.53
7.0.240.0070.01015.20
7.0.230.0040.00915.48
7.0.220.0070.00715.27
7.0.210.0120.00015.34
7.0.200.0050.01115.62
7.0.190.0060.01215.56
7.0.180.0090.00315.26
7.0.170.0000.01315.54
7.0.160.0070.00715.50
7.0.150.0040.00815.52
7.0.140.0030.00615.27
7.0.130.0130.00315.61
7.0.120.0040.00815.46
7.0.110.0030.00615.23
7.0.100.0000.01215.61
7.0.90.0070.00715.44
7.0.80.0080.00915.55
7.0.70.0070.00715.22
7.0.60.0140.04518.70
7.0.50.0050.04716.63
7.0.40.0180.02616.82
7.0.30.0080.03716.91
7.0.20.0130.03316.85
7.0.10.0230.03516.79
7.0.00.0070.03517.00
5.6.400.0000.01014.06
5.6.390.0030.00714.33
5.6.380.0090.00614.58
5.6.370.0090.00914.36
5.6.360.0100.00714.24
5.6.350.0060.01014.52
5.6.340.0090.00914.58
5.6.330.0030.01314.56
5.6.320.0080.01114.37
5.6.310.0040.01114.18
5.6.300.0060.00314.55
5.6.290.0090.00014.30
5.6.280.0080.03817.77
5.6.270.0110.00414.56
5.6.260.0060.00614.45
5.6.250.0030.01014.30
5.6.240.0090.00014.55
5.6.230.0040.00814.63
5.6.220.0040.01114.41
5.6.210.0070.04717.49
5.6.200.0020.04716.23
5.6.190.0170.03017.54
5.6.180.0100.03717.48
5.6.170.0180.02517.44
5.6.160.0100.03817.65
5.6.150.0170.02817.35
5.6.140.0070.03717.35
5.6.130.0230.02417.37
5.6.120.0160.02917.44
5.6.110.0050.03517.34
5.6.100.0180.02517.27
5.6.90.0170.03017.46
5.6.80.0160.03516.91
5.6.70.0120.03717.01
5.6.60.0180.02917.12
5.6.50.0150.02416.95
5.6.40.0230.02317.03
5.6.30.0180.03317.00
5.6.20.0100.03316.99
5.6.10.0020.03717.11
5.6.00.0130.03116.86
5.5.380.0040.00414.36
5.5.370.0060.00614.34
5.5.360.0060.01214.37
5.5.350.0100.04217.33
5.5.340.0050.03016.24
5.5.330.0050.03817.33
5.5.320.0130.03217.44
5.5.310.0120.03117.52
5.5.300.0120.03317.21
5.5.290.0120.04017.18
5.5.280.0130.02617.04
5.5.270.0130.02517.25
5.5.260.0150.03317.22
5.5.250.0200.02817.22
5.5.240.0120.03616.87
5.5.230.0130.03216.88
5.5.220.0150.03516.98
5.5.210.0120.03316.95
5.5.200.0030.03716.79
5.5.190.0100.03416.91
5.5.180.0070.03116.89
5.5.170.0150.00014.31
5.5.160.0150.03216.90
5.5.150.0130.03316.91
5.5.140.0180.02816.87
5.5.130.0210.02516.87
5.5.120.0130.03516.96
5.5.110.0180.03416.93
5.5.100.0170.03016.66
5.5.90.0200.02816.83
5.5.80.0180.02516.86
5.5.70.0180.03316.64
5.5.60.0120.03416.74
5.5.50.0210.03316.68
5.5.40.0230.02616.76
5.5.30.0180.02816.71
5.5.20.0150.02716.80
5.5.10.0220.02716.89
5.5.00.0100.03316.93

preferences:
70.41 ms | 401 KiB | 5 Q