1--TEST--
2Hexadecimal integer strings (64bit)
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6?>
7--FILE--
8<?php
9/* Using hexadecimal prefix notation lowercase */
10/* Maximum value representable as integer */
11$hex = 0x7FFFFFFFFFFFFFFF;
12var_dump($hex);
13var_dump(PHP_INT_MAX);
14
15/* Floating number */
16$hex = 0x45FFFABCDE0000000;
17var_dump($hex);
18
19/* Integer */
20$hex = 0x1C;
21var_dump($hex);
22
23/* underscore separator */
24$hex = 0x1_C;
25var_dump($hex);
26
27/* Ignore leading 0 and _ */
28$hex = 0x0_01C;
29var_dump($hex);
30$hex = 0x0_1C;
31var_dump($hex);
32
33/* Overflow to infinity */
34$hex = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
35var_dump($hex);
36
37
38/* Using hexadecimal prefix notation uppercase */
39/* Maximum value representable as integer */
40$hex = 0X7FFFFFFFFFFFFFFF;
41var_dump($hex);
42var_dump(PHP_INT_MAX);
43
44/* Floating number */
45$hex = 0X45FFFABCDE0000000;
46var_dump($hex);
47
48/* Integer */
49$hex = 0X1C;
50var_dump($hex);
51
52/* underscore separator */
53$hex = 0X1_C;
54var_dump($hex);
55
56/* Ignore leading 0 and _ */
57$hex = 0X0_01C;
58var_dump($hex);
59$hex = 0X0_1C;
60var_dump($hex);
61
62/* Overflow to infinity */
63$hex = 0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
64var_dump($hex);
65
66?>
67--EXPECT--
68int(9223372036854775807)
69int(9223372036854775807)
70float(8.070441274821732E+19)
71int(28)
72int(28)
73int(28)
74int(28)
75float(INF)
76int(9223372036854775807)
77int(9223372036854775807)
78float(8.070441274821732E+19)
79int(28)
80int(28)
81int(28)
82int(28)
83float(INF)
84