xref: /PHP-Parser/test/code/parser/scalar/int.test (revision 23835d20)
1Different integer syntaxes
2-----
3<?php
4
50;
61;
7@@{ PHP_INT_MAX     }@@;
8@@{ PHP_INT_MAX + 1 }@@;
90xFFF;
100xfff;
110XfFf;
120777;
130b111000111000;
14-----
15array(
16    0: Stmt_Expression(
17        expr: Scalar_Int(
18            value: 0
19        )
20    )
21    1: Stmt_Expression(
22        expr: Scalar_Int(
23            value: 1
24        )
25    )
26    2: Stmt_Expression(
27        expr: Scalar_Int(
28            value: @@{ PHP_INT_MAX }@@
29        )
30    )
31    3: Stmt_Expression(
32        expr: Scalar_Float(
33            value: @@{ PHP_INT_MAX + 1 }@@
34        )
35    )
36    4: Stmt_Expression(
37        expr: Scalar_Int(
38            value: 4095
39        )
40    )
41    5: Stmt_Expression(
42        expr: Scalar_Int(
43            value: 4095
44        )
45    )
46    6: Stmt_Expression(
47        expr: Scalar_Int(
48            value: 4095
49        )
50    )
51    7: Stmt_Expression(
52        expr: Scalar_Int(
53            value: 511
54        )
55    )
56    8: Stmt_Expression(
57        expr: Scalar_Int(
58            value: 3640
59        )
60    )
61)
62