1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
--TEST--
The object type is recognized
--FILE--
<?php
require __DIR__ . '/../util.php';
$code = <<<'PHP'
<?php
function test(object $obj) : object {}
PHP;
echo ast_dump(ast\parse_code($code, $version=70));
?>
--EXPECTF--
AST_STMT_LIST
0: AST_FUNC_DECL
name: "test"
docComment: null
params: AST_PARAM_LIST
0: AST_PARAM
type: AST_TYPE
flags: TYPE_OBJECT (%d)
name: "obj"
default: null
stmts: AST_STMT_LIST
returnType: AST_TYPE
flags: TYPE_OBJECT (%d)
__declId: 0
|