← All built-ins / octdec()

octdec()

octdec(string $s): int

Parameters

NameTypeDescription
$sstringoctal digits

Return value

The parsed integer.

Example

echo octdec("777"), " ", octdec("10");
511 8

See also

decoct()bindec()hexdec()