Menu Samaritan's Purse

DECOCT

Decimal to octal

SYNTAX

decoct ( int $number ) : string

PARAMETERS

number

Decimal value to convert

NEGATIVE DECIMAL POSITIVE DECIMAL OCTAL
0 0
1 1
2 2
... ...
9223372036854775806 777777777777777777776
9223372036854775807 (largest signed integer) 777777777777777777777
-9223372036854775808 9223372036854775808 1000000000000000000000
... ... ...
-2 18446744073709551614 1777777777777777777776
-1 18446744073709551615 (largest unsigned integer) 1777777777777777777777

RETURN

Octal string representation of number

EXAMPLES

1

0

2

1

3

2

4

777777777777777777776

5

777777777777777777777

6

1000000000000000000000
1000000000000000000000

7

1777777777777777777776
0

8

1777777777777777777777
0

PHP