PHP -octdec()- Funktion
Beispiel
Oktal in Dezimal umwandeln:
<?php
echo octdec("36") . "<br>";
echo octdec("12") . "<br>";
echo octdec("3063") . "<br>";
echo octdec("106");
?>
Definition und Verwendung
Die Funktion octdec() wandelt eine Oktalzahl in eine Dezimalzahl um.
Tipp: Um dezimal in oktal umzuwandeln, sehen Sie sich die Funktion decoct() an .
Syntax
octdec(octal_string);
Parameterwerte
Parameter | Description |
---|---|
octal_string | Required. Specifies the octal string to convert |
Technische Details
Rückgabewert: | Der Dezimalwert von octal_string |
---|---|
Rückgabetyp: | Float / Ganzzahl |
PHP-Version: | 4+ |
❮ PHP Math Referenz