September 2001
Intermediate to advanced
768 pages
32h 45m
English
int octdec(string oct) Converts a number from octal to decimal notation.
Returns:
Decimal equivalent of an octal value
Description:
Converts an octal number represented as a string into its decimal equivalent. If the string is not a valid octal number, an error is returned. The largest octal value that can be converted is 017777777777.
Leading zeros are ignored.
Version:
PHP 3, PHP 4
See also:
base_convert() bindec() decbin() dechex() decoct() hexdec()
Example:
$number = '0123456'; echo octdec($number); |
Read now
Unlock full access