1--TEST--
2Test decoct() - basic function test decoct()
3--FILE--
4<?php
5$values = array(10,
6                3950.5,
7                3.9505e3,
8                03,
9                0x5F,
10                "10",
11                "3950.5",
12                "3.9505e3",
13                "039",
14                "0x5F",
15                true,
16                false,
17                );
18
19foreach ($values as $value) {
20    try {
21       var_dump(decoct($value));
22    } catch (TypeError $exception) {
23        echo $exception->getMessage() . "\n";
24    }
25}
26
27?>
28--EXPECTF--
29string(2) "12"
30
31Deprecated: Implicit conversion from float 3950.5 to int loses precision in %s on line %d
32string(4) "7556"
33
34Deprecated: Implicit conversion from float 3950.5 to int loses precision in %s on line %d
35string(4) "7556"
36string(1) "3"
37string(3) "137"
38string(2) "12"
39
40Deprecated: Implicit conversion from float-string "3950.5" to int loses precision in %s on line %d
41string(4) "7556"
42
43Deprecated: Implicit conversion from float-string "3.9505e3" to int loses precision in %s on line %d
44string(4) "7556"
45string(2) "47"
46decoct(): Argument #1 ($num) must be of type int, string given
47string(1) "1"
48string(1) "0"
49