1--TEST--
2Test octdec() - basic function test octdec()
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6?>
7--FILE--
8<?php
9
10echo "*** Testing octdec() : basic functionality ***\n";
11
12$values = array(01234567,
13                0567,
14                017777777777,
15                020000000000,
16                0x1234ABC,
17                12345,
18                '01234567',
19                '0567',
20                '017777777777',
21                '020000000000',
22                '0x1234ABC',
23                '12345',
24                31101.3,
25                31.1013e5,
26                true,
27                false,
28                null);
29
30for ($i = 0; $i < count($values); $i++) {
31    $res = octdec($values[$i]);
32    var_dump($res);
33}
34?>
35--EXPECTF--
36*** Testing octdec() : basic functionality ***
37
38Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
39int(14489)
40int(253)
41
42Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
43int(36947879)
44
45Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
46int(4618484)
47
48Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
49int(4104)
50int(5349)
51int(342391)
52int(375)
53int(2147483647)
54int(2147483648)
55
56Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
57int(668)
58int(5349)
59
60Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
61int(102923)
62int(823384)
63int(1)
64int(0)
65int(0)
66