xref: /php-ast/tests/class_type_85.phpt (revision 28f5201f)
1--TEST--
2Class types only used for enums in AST version 85
3--FILE--
4<?php
5
6require __DIR__ . '/../util.php';
7
8$code = <<<'PHP'
9<?php
10final class X {
11}
12
13interface I {
14}
15PHP;
16
17$node = ast\parse_code($code, $version=85);
18echo ast_dump($node), "\n";
19--EXPECTF--
20AST_STMT_LIST
21    0: AST_CLASS
22        flags: CLASS_FINAL (%d)
23        name: "X"
24        docComment: null
25        extends: null
26        implements: null
27        stmts: AST_STMT_LIST
28        attributes: null
29        type: null
30        __declId: 0
31    1: AST_CLASS
32        flags: CLASS_INTERFACE (%d)
33        name: "I"
34        docComment: null
35        extends: null
36        implements: null
37        stmts: AST_STMT_LIST
38        attributes: null
39        type: null
40        __declId: 1