Forum und email

octdec

(PHP 4, PHP 5)

octdec — Da ottale a decimale

Descrizione

int octdec ( string $stringa_ottale )

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().