base_convert

It  convert a number between arbitrary bases

Example

<?php
$octal = “0017”;
$dec = base_convert($octal,8,10);
echo “$octal in octal is $dec in decimal.”;
?>

Output

0017 in octal is 15 in decimal.

Share