1--TEST--
2Testing with comments around semi-reserved names (not intended to be legible)
3--FILE--
4<?php
5
6trait TraitA
7{
8    public static function list(){ echo __METHOD__, PHP_EOL; }
9    public static function /* comment */ catch(){ echo __METHOD__, PHP_EOL; }
10    private static function // comment
11        throw(){ echo __METHOD__, PHP_EOL; }
12    private static function
13    # comment
14    self(){ echo __METHOD__, PHP_EOL; }
15}
16
17trait TraitB
18{
19    public static function exit(){ echo __METHOD__, PHP_EOL; }
20    protected static function try(){ echo __METHOD__, PHP_EOL; }
21}
22
23class Foo
24{
25    use TraitA {
26        TraitA::
27            //
28            /** doc comment */
29            #
30        catch /* comment */
31            // comment
32            # comment
33        insteadof TraitB;
34
35        TraitA::list as public /**/ foreach;
36    }
37
38    use TraitB {
39        try /*comment*/ as public attempt;
40        exit // comment
41            as/*comment*/die; // non qualified
42        \TraitB::exit as bye; // full qualified
43        namespace\TraitB::exit #
44        as byebye; // even more full qualified
45        TraitB
46            ::
47            /**  */
48            exit as farewell; // full qualified with weird spacing
49    }
50}
51
52Foo /**/
53#
54//
55/**  */
56::
57/**/
58#
59//
60/**  */
61attempt();
62
63echo PHP_EOL, "Done", PHP_EOL;
64--EXPECT--
65TraitB::try
66
67Done
68