xref: /php-ast/tests/class_on_objects.phpt (revision 5e3ebe21)
1--TEST--
2$x::class in PHP 8.0
3--FILE--
4<?php
5
6require __DIR__ . '/../util.php';
7
8$code = <<<'PHP'
9<?php
10echo $x::class;
11PHP;
12
13$node = ast\parse_code($code, $version=70);
14echo ast_dump($node), "\n";
15--EXPECTF--
16AST_STMT_LIST
17    0: AST_ECHO
18        expr: AST_CLASS_NAME
19            class: AST_VAR
20                name: "x"