1--TEST--
2Semi reserved words support: member access
3--SKIPIF--
4<?php if (!extension_loaded("tokenizer")) print "skip"; ?>
5--FILE--
6<?php
7$tokens = token_get_all('<?php
8X::continue;
9X::$continue;
10$x->$continue;
11X::continue();
12$x->continue();
13X::class;
14$x->__halt_compiler();
15
16class X {
17    const CONTINUE = 1;
18    public $x = self::CONTINUE + 1;
19}
20', TOKEN_PARSE);
21
22array_walk($tokens, function($tk) {
23  if(is_array($tk)) {
24    if(($t = token_name($tk[0])) == 'T_WHITESPACE') return;
25    echo "L{$tk[2]}: ".$t." {$tk[1]}", PHP_EOL;
26  }
27  else echo $tk, PHP_EOL;
28});
29
30echo "Done";
31
32?>
33--EXPECT--
34L1: T_OPEN_TAG <?php
35
36L2: T_STRING X
37L2: T_DOUBLE_COLON ::
38L2: T_STRING continue
39;
40L3: T_STRING X
41L3: T_DOUBLE_COLON ::
42L3: T_VARIABLE $continue
43;
44L4: T_VARIABLE $x
45L4: T_OBJECT_OPERATOR ->
46L4: T_VARIABLE $continue
47;
48L5: T_STRING X
49L5: T_DOUBLE_COLON ::
50L5: T_STRING continue
51(
52)
53;
54L6: T_VARIABLE $x
55L6: T_OBJECT_OPERATOR ->
56L6: T_STRING continue
57(
58)
59;
60L7: T_STRING X
61L7: T_DOUBLE_COLON ::
62L7: T_STRING class
63;
64L8: T_VARIABLE $x
65L8: T_OBJECT_OPERATOR ->
66L8: T_STRING __halt_compiler
67(
68)
69;
70L10: T_CLASS class
71L10: T_STRING X
72{
73L11: T_CONST const
74L11: T_STRING CONTINUE
75=
76L11: T_LNUMBER 1
77;
78L12: T_PUBLIC public
79L12: T_VARIABLE $x
80=
81L12: T_STRING self
82L12: T_DOUBLE_COLON ::
83L12: T_STRING CONTINUE
84+
85L12: T_LNUMBER 1
86;
87}
88Done
89