1--TEST--
2Test deg2rad 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$longVals = array(
16    MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
17    MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
18    MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
19);
20
21
22foreach ($longVals as $longVal) {
23   echo "--- testing: $longVal ---\n";
24   var_dump(deg2rad($longVal));
25}
26
27?>
28--EXPECT--
29--- testing: 9223372036854775807 ---
30float(1.6097821017949162E+17)
31--- testing: -9223372036854775808 ---
32float(-1.6097821017949162E+17)
33--- testing: 2147483647 ---
34float(37480660.27288565)
35--- testing: -2147483648 ---
36float(-37480660.29033894)
37--- testing: 9223372034707292160 ---
38float(1.6097821014201098E+17)
39--- testing: -9223372034707292160 ---
40float(-1.6097821014201098E+17)
41--- testing: 2147483648 ---
42float(37480660.29033894)
43--- testing: -2147483649 ---
44float(-37480660.30779223)
45--- testing: 4294967294 ---
46float(74961320.5457713)
47--- testing: 4294967295 ---
48float(74961320.5632246)
49--- testing: 4294967293 ---
50float(74961320.528318)
51--- testing: 9223372036854775806 ---
52float(1.6097821017949162E+17)
53--- testing: 9.2233720368548E+18 ---
54float(1.6097821017949162E+17)
55--- testing: -9223372036854775807 ---
56float(-1.6097821017949162E+17)
57--- testing: -9.2233720368548E+18 ---
58float(-1.6097821017949162E+17)
59