1--TEST--
2Test octdec function : 64bit long tests
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6?>
7--FILE--
8<?php
9
10define("MAX_64Bit", 9223372036854775807);
11define("MAX_32Bit", 2147483647);
12define("MIN_64Bit", -9223372036854775807 - 1);
13define("MIN_32Bit", -2147483647 - 1);
14
15$octLongStrs = array(
16   '777777777777777777777',
17   '1777777777777777777777',
18   '17777777777',
19   '37777777777',
20   '377777777777777777777777',
21   '17777777777777777777777777',
22   '377777777777',
23   '777777777777',
24);
25
26
27foreach ($octLongStrs as $strVal) {
28   echo "--- testing: $strVal ---\n";
29   var_dump(octdec($strVal));
30}
31
32?>
33===DONE===
34--EXPECT--
35--- testing: 777777777777777777777 ---
36int(9223372036854775807)
37--- testing: 1777777777777777777777 ---
38float(1.844674407371E+19)
39--- testing: 17777777777 ---
40int(2147483647)
41--- testing: 37777777777 ---
42int(4294967295)
43--- testing: 377777777777777777777777 ---
44float(2.3611832414348E+21)
45--- testing: 17777777777777777777777777 ---
46float(7.5557863725914E+22)
47--- testing: 377777777777 ---
48int(34359738367)
49--- testing: 777777777777 ---
50int(68719476735)
51===DONE===
52