1--TEST-- 2readonly class support in php 8.2+ 3--SKIPIF-- 4<?php if (PHP_VERSION_ID < 80200) die('skip PHP >=8.2 only'); ?> 5--FILE-- 6<?php 7require __DIR__ . '/../util.php'; 8 9$code = <<<'PHP' 10<?php 11readonly class X {} 12PHP; 13 14$node = ast\parse_code($code, $version=85); 15echo ast_dump($node), "\n"; 16--EXPECTF-- 17AST_STMT_LIST 18 0: AST_CLASS 19 flags: CLASS_READONLY (%d) 20 name: "X" 21 docComment: null 22 extends: null 23 implements: null 24 stmts: AST_STMT_LIST 25 attributes: null 26 type: null 27 __declId: 0 28