PHP.nl

octdec

octdec

Octal to decimal

 **octdec** string $octal_string

Returns the decimal equivalent of the octal number represented by the argument. octal_string

octal_string The octal string to convert. Any invalid characters in are silently ignored. As of PHP 7.4.0 supplying any invalid characters is deprecated. octal_string

The decimal representation of octal_string

Voorbeeld: example

<?php
echo octdec('77') . "\n";
echo octdec(decoct(45));
?>
63
45

Opmerking: > The function can convert numbers that are too large to fit into the platforms type, larger values are returned as in that case. int``float

decoct``bindec``hexdec``base_convert