Fonction PHP octdec()
Exemple
Convertir octal en décimal :
<?php
echo octdec("36") . "<br>";
echo octdec("12") . "<br>";
echo octdec("3063") . "<br>";
echo octdec("106");
?>
Définition et utilisation
La fonction octdec() convertit un nombre octal en nombre décimal.
Astuce : Pour convertir décimal en octal, regardez la fonction decoct() .
Syntaxe
octdec(octal_string);
Valeurs des paramètres
Parameter | Description |
---|---|
octal_string | Required. Specifies the octal string to convert |
Détails techniques
Valeur de retour : | La valeur décimale de octal_string |
---|---|
Type de retour : | Flottant / Entier |
Version PHP : | 4+ |
❮ Référence mathématique PHP