3v4l.org

run code in 300+ PHP versions simultaneously
<?php class base58 { static public $alphabet = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"; public static function encode($int) { $base58_string = ""; $base = strlen(self::$alphabet); while($int >= $base) { $div = floor($int / $base); $mod = ($int - ($base * $div)); // php's % is broke with >32bit int on 32bit proc $base58_string = self::$alphabet{$mod} . $base58_string; $int = $div; } if($int) $base58_string = self::$alphabet{$int} . $base58_string; return $base58_string; } public static function decode($base58) { $int_val = 0; for($i=strlen($base58)-1,$j=1,$base=strlen(self::$alphabet);$i>=0;$i--,$j*=$base) { $int_val += $j * strpos(self::$alphabet, $base58{$i}); } return $int_val; } } echo "http://flic.kr/p/" . base58::encode(3392387861) . "\n";

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.0040.01118.43
8.3.50.0100.00522.04
8.3.40.0140.00318.71
8.3.30.0040.01518.95
8.3.20.0080.00020.39
8.3.10.0080.00023.69
8.3.00.0080.00020.80
8.2.180.0060.01516.63
8.2.170.0120.00322.96
8.2.160.0070.00720.47
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00020.70
8.2.110.0090.00022.14
8.2.100.0070.00420.48
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0080.00017.65
8.2.50.0040.00418.07
8.2.40.0080.00019.82
8.2.30.0000.00718.25
8.2.20.0000.00717.55
8.2.10.0070.00017.95
8.2.00.0000.00817.56
8.1.280.0100.00725.92
8.1.270.0080.00023.76
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0070.00321.96
8.1.230.0040.00819.09
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0050.00317.11
8.1.180.0000.00818.10
8.1.170.0000.00918.51
8.1.160.0000.00821.96
8.1.150.0040.00418.51
8.1.140.0000.00717.39
8.1.130.0030.00317.70
8.1.120.0030.00317.27
8.1.110.0030.00317.35
8.1.100.0040.00417.36
8.1.90.0040.00417.22
8.1.80.0000.00717.38
8.1.70.0040.00417.27
8.1.60.0090.00017.44
8.1.50.0080.00017.40
8.1.40.0030.00617.31
8.1.30.0040.00417.50
8.1.20.0040.00417.52
8.1.10.0040.00417.39
8.1.00.0030.00517.25
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.34
8.0.270.0000.00717.12
8.0.260.0000.00617.17
8.0.250.0000.00716.85
8.0.240.0040.00416.83
8.0.230.0000.00716.93
8.0.220.0000.00716.82
8.0.210.0030.00316.71
8.0.200.0060.00016.88
8.0.190.0040.00416.89
8.0.180.0030.00516.75
8.0.170.0050.00316.89
8.0.160.0040.00416.88
8.0.150.0000.00716.66
8.0.140.0080.00016.66
8.0.130.0000.00713.34
8.0.120.0000.00816.70
8.0.110.0000.00716.72
8.0.100.0030.00516.86
8.0.90.0000.00716.68
8.0.80.0060.00916.75
8.0.70.0000.00716.89
8.0.60.0080.00016.78
8.0.50.0050.00216.69
8.0.30.0080.01317.01
8.0.20.0140.00517.40
8.0.10.0030.00516.90
8.0.00.0110.00616.74
7.4.330.0030.00315.06
7.4.320.0000.00616.57
7.4.300.0070.00016.51
7.4.290.0030.00316.71
7.4.280.0040.00816.66
7.4.270.0000.00716.73
7.4.260.0030.00316.55
7.4.250.0030.00516.49
7.4.240.0020.00616.68
7.4.230.0000.00716.59
7.4.220.0040.01416.70
7.4.210.0000.01416.68
7.4.200.0030.00316.67
7.4.190.0030.00316.64
7.4.160.0060.01016.75
7.4.150.0040.01417.40
7.4.140.0090.01117.86
7.4.130.0100.00916.71
7.4.120.0140.00716.60
7.4.110.0100.00616.59
7.4.100.0070.01016.63
7.4.90.0080.00816.80
7.4.80.0030.01419.39
7.4.70.0090.00616.57
7.4.60.0110.00816.60
7.4.50.0040.00416.77
7.4.40.0130.00316.71
7.4.30.0080.00816.68
7.4.10.0140.00315.04
7.4.00.0050.00815.04
7.3.330.0000.00513.47
7.3.320.0030.00313.38
7.3.310.0000.00816.44
7.3.300.0020.00516.48
7.3.290.0030.01016.52
7.3.280.0110.00816.49
7.3.270.0060.01217.40
7.3.260.0100.00716.73
7.3.250.0130.00816.70
7.3.240.0080.01216.44
7.3.230.0030.01216.75
7.3.210.0090.00916.46
7.3.200.0090.00919.39
7.3.190.0130.01016.65
7.3.180.0060.01016.61
7.3.170.0070.01316.43
7.3.160.0060.01316.56
7.3.130.0070.01114.91
7.3.120.0060.01014.83
7.3.110.0130.00614.96
7.3.100.0090.00615.20
7.3.90.0060.00914.87
7.3.80.0040.00414.62
7.3.70.0000.01514.98
7.3.60.0090.00614.95
7.3.50.0040.01114.99
7.3.40.0100.00314.89
7.3.30.0030.00914.75
7.3.20.0040.01516.64
7.3.10.0180.00016.89
7.3.00.0040.01116.67
7.2.330.0100.00616.95
7.2.320.0090.00916.95
7.2.310.0000.01816.50
7.2.300.0120.00616.54
7.2.290.0030.01416.52
7.2.260.0090.00915.10
7.2.250.0000.01315.24
7.2.240.0000.01415.26
7.2.230.0030.01015.26
7.2.220.0060.00915.34
7.2.210.0080.00815.24
7.2.200.0150.00015.26
7.2.190.0090.00615.18
7.2.180.0040.01115.10
7.2.170.0070.00715.13
7.2.160.0090.00915.20
7.2.150.0140.00417.02
7.2.140.0060.01116.98
7.2.130.0030.01316.98
7.2.120.0000.01716.95
7.2.110.0000.01417.06
7.2.100.0060.00916.95
7.2.90.0070.00717.01
7.2.80.0130.00316.93
7.2.70.0110.00316.84
7.2.60.0070.00716.81
7.2.50.0070.00716.79
7.2.40.0030.01017.00
7.2.30.0000.01517.10
7.2.20.0080.00416.85
7.2.10.0070.01017.04
7.2.00.0070.00717.17
7.1.330.0000.01415.96
7.1.320.0060.00915.86
7.1.310.0030.01115.57
7.1.300.0110.00315.84
7.1.290.0070.00715.87
7.1.280.0070.00715.82
7.1.270.0060.01216.00
7.1.260.0030.01315.82
7.1.250.0030.01315.75
7.1.240.0040.01215.87
7.1.230.0030.01315.66
7.1.220.0030.00815.79
7.1.210.0070.00715.87
7.1.200.0060.00615.78
7.1.190.0000.01115.79
7.1.180.0030.01015.74
7.1.170.0040.00815.96
7.1.160.0030.01015.81
7.1.150.0070.00715.57
7.1.140.0120.00315.89
7.1.130.0030.01515.61
7.1.120.0030.00715.90
7.1.110.0000.01215.91
7.1.100.0130.00315.72
7.1.90.0100.00315.92
7.1.80.0070.00315.90
7.1.70.0070.00116.58
7.1.60.0090.00817.81
7.1.50.0060.01316.44
7.1.40.0040.01115.79
7.1.30.0030.00815.75
7.1.20.0060.00615.90
7.1.10.0030.01015.79
7.1.00.0070.04219.18
7.0.330.0070.00315.41
7.0.320.0140.00015.50
7.0.310.0030.00615.39
7.0.300.0030.01015.64
7.0.290.0100.00315.35
7.0.280.0110.00415.32
7.0.270.0030.01015.41
7.0.260.0000.01215.51
7.0.250.0080.00515.57
7.0.240.0030.00615.34
7.0.230.0000.01315.63
7.0.220.0050.00815.26
7.0.210.0030.00815.64
7.0.200.0070.00516.05
7.0.190.0040.01115.48
7.0.180.0030.01015.29
7.0.170.0040.00715.48
7.0.160.0080.00415.32
7.0.150.0040.00715.42
7.0.140.0070.03918.87
7.0.130.0120.00415.39
7.0.120.0090.00315.45
7.0.110.0140.00015.49
7.0.100.0100.00315.46
7.0.90.0100.00615.43
7.0.80.0060.00615.16
7.0.70.0070.00715.33
7.0.60.0030.04717.62
7.0.50.0030.03716.71
7.0.40.0050.03515.54
7.0.30.0070.02415.57
7.0.20.0100.04015.69
7.0.10.0050.04815.64
7.0.00.0050.04515.69
5.6.400.0070.00714.59
5.6.390.0060.00614.31
5.6.380.0130.00314.03
5.6.370.0030.00614.20
5.6.360.0090.00014.68
5.6.350.0030.01314.39
5.6.340.0070.00714.14
5.6.330.0000.00914.34
5.6.320.0030.00614.42
5.6.310.0070.00414.52
5.6.300.0060.00914.62
5.6.290.0070.01114.58
5.6.280.0070.04017.77
5.6.270.0070.00714.50
5.6.260.0040.00914.36
5.6.250.0070.01014.42
5.6.240.0060.00614.65
5.6.230.0000.01414.24
5.6.220.0030.01414.52
5.6.210.0100.03617.43
5.6.200.0090.04316.17
5.6.190.0050.02316.24
5.6.180.0080.04316.37
5.6.170.0050.04416.26
5.6.160.0110.04016.23
5.6.150.0100.02216.13
5.6.140.0100.04016.24
5.6.130.0080.03716.32
5.6.120.0030.04516.33
5.6.110.0080.04116.29
5.6.100.0060.04416.39
5.6.90.0020.02716.37
5.6.80.0120.02315.90
5.6.70.0100.03515.85
5.6.60.0050.03515.84
5.6.50.0020.02616.07
5.6.40.0080.03215.86
5.6.30.0020.03015.87
5.6.20.0060.04316.02
5.6.10.0040.04215.97
5.6.00.0050.04115.95
5.5.380.0000.01714.38
5.5.370.0030.00514.25
5.5.360.0090.00614.30
5.5.350.0050.02417.40
5.5.340.0060.04316.02
5.5.330.0100.04416.07
5.5.320.0020.03016.29
5.5.310.0110.04016.00
5.5.300.0050.02816.17
5.5.290.0050.04116.12
5.5.280.0070.03916.23
5.5.270.0050.04716.36
5.5.260.0080.04616.29
5.5.250.0050.03515.95
5.5.240.0080.03515.86
5.5.230.0020.04615.78
5.5.220.0050.04215.76
5.5.210.0100.03815.86
5.5.200.0120.01915.72
5.5.190.0050.03015.80
5.5.180.0050.04115.79
5.5.170.0060.00314.21
5.5.160.0020.02315.82
5.5.150.0050.03715.90
5.5.140.0070.03815.83
5.5.130.0100.03215.76
5.5.120.0050.02715.82
5.5.110.0060.03815.69
5.5.100.0030.04215.75
5.5.90.0070.02815.73
5.5.80.0050.04415.83
5.5.70.0070.03215.72
5.5.60.0070.04215.71
5.5.50.0020.03215.63
5.5.40.0030.02815.69
5.5.30.0090.04215.76
5.5.20.0100.02015.79
5.5.10.0020.04615.80
5.5.00.0020.02715.76
5.4.450.0070.04315.71
5.4.440.0050.02015.79
5.4.430.0050.04315.70
5.4.420.0050.02415.59
5.4.410.0090.04015.61
5.4.400.0030.03515.55
5.4.390.0100.03715.54
5.4.380.0050.04015.51
5.4.370.0080.03515.55
5.4.360.0080.04115.48
5.4.350.0080.02315.55
5.4.340.0030.04315.62
5.4.330.0030.00711.98
5.4.320.0080.03915.46
5.4.310.0050.03415.43
5.4.300.0050.04015.47
5.4.290.0020.02915.51
5.4.280.0050.03515.53
5.4.270.0050.04115.52
5.4.260.0050.02715.53
5.4.250.0070.03315.51
5.4.240.0050.02515.43
5.4.230.0050.02815.46
5.4.220.0050.03815.46
5.4.210.0070.03315.64
5.4.200.0070.02715.55
5.4.190.0020.04215.64
5.4.180.0040.02415.53
5.4.170.0060.02315.53
5.4.160.0050.03815.54
5.4.150.0050.04315.51
5.4.140.0030.03314.20
5.4.130.0020.04314.16
5.4.120.0020.02314.26
5.4.110.0030.03714.21
5.4.100.0030.02814.23
5.4.90.0090.02714.20
5.4.80.0100.03714.22
5.4.70.0010.03814.10
5.4.60.0070.02814.13
5.4.50.0100.03514.14
5.4.40.0050.02714.18
5.4.30.0090.03614.27
5.4.20.0080.02814.22
5.4.10.0000.03114.15
5.4.00.0060.03813.90
5.3.290.0070.07014.52
5.3.280.0070.06714.72
5.3.270.0130.04014.66
5.3.260.0130.06714.65
5.3.250.0100.08014.66
5.3.240.0070.06014.46
5.3.230.0070.05014.70
5.3.220.0000.04314.62
5.3.210.0170.06714.63
5.3.200.0030.08014.58
5.3.190.0070.07014.62
5.3.180.0130.04714.62
5.3.170.0070.04014.57
5.3.160.0070.03714.61
5.3.150.0100.07314.59
5.3.140.0130.06714.52
5.3.130.0030.08314.59
5.3.120.0000.05014.61
5.3.110.0030.05714.59
5.3.100.0070.05714.25
5.3.90.0070.07313.98
5.3.80.0030.07314.04
5.3.70.0070.04314.08
5.3.60.0000.04013.89
5.3.50.0070.07713.84
5.3.40.0070.04313.98
5.3.30.0030.08313.93
5.3.20.0070.05713.76
5.3.10.0070.06313.68
5.3.00.0030.05713.70
5.2.170.0100.03311.19
5.2.160.0000.07011.18
5.2.150.0030.06711.21
5.2.140.0070.06011.22
5.2.130.0100.06011.12
5.2.120.0070.05011.11
5.2.110.0030.06011.14
5.2.100.0070.04711.08
5.2.90.0000.05011.18
5.2.80.0100.05711.10
5.2.70.0030.06310.95
5.2.60.0030.04311.03
5.2.50.0030.06010.91
5.2.40.0070.06011.02
5.2.30.0230.04711.02
5.2.20.0100.05711.00
5.2.10.0070.04711.07
5.2.00.0030.03710.79
5.1.60.0030.05010.21
5.1.50.0100.04710.00
5.1.40.0030.0409.93
5.1.30.0130.03310.24
5.1.20.0070.05710.39
5.1.10.0030.0579.91
5.1.00.0070.0539.99
5.0.50.0000.0508.54
5.0.40.0070.0438.41
5.0.30.0000.0578.37
5.0.20.0030.0338.37
5.0.10.0070.0438.37
5.0.00.0100.0578.37
4.4.90.0000.0278.37
4.4.80.0070.0178.37
4.4.70.0030.0338.37
4.4.60.0070.0338.37
4.4.50.0030.0338.37
4.4.40.0070.0378.37
4.4.30.0030.0278.37
4.4.20.0000.0408.37
4.4.10.0030.0338.37
4.4.00.0100.0478.37
4.3.110.0000.0408.37
4.3.100.0030.0338.37
4.3.90.0000.0238.37
4.3.80.0030.0538.37
4.3.70.0000.0378.37
4.3.60.0070.0308.37
4.3.50.0000.0408.37
4.3.40.0030.0508.37
4.3.30.0030.0378.37
4.3.20.0000.0378.37
4.3.10.0000.0378.37
4.3.00.0030.0378.37

preferences:
48.37 ms | 401 KiB | 5 Q