octdec

(PHP 4, PHP 5, PHP 7, PHP 8)

octdecDa ottale a decimale

Descrizione

octdec(string $stringa_ottale): int

Restituisce l'equivalente decimale del numero ottale rappresentato dall'argomento stringa_ottale. OctDec converte una stringa ottale in un numero decimale. Il più grande numero che può essere convertito è 17777777777 o 2147483647 in decimale.

Example #1 Esempio per octdec()

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

L'esempio precedente visualizzerà:

 
63 
45 

Vedere anche decoct(), bindec(), hexdec() e base_convert().