--TEST-- Property type hints in PHP 7.4 --SKIPIF-- = 7.4 only'); ?> --FILE-- --EXPECTF-- Deprecated: ast\parse_code(): Version 60 is deprecated in %s.php on line 18 The type property should not be set in version 60 AST_STMT_LIST 0: AST_NAMESPACE name: "Foo" stmts: null 1: AST_CLASS name: "test" docComment: null extends: null implements: null stmts: AST_STMT_LIST 0: AST_PROP_DECL flags: MODIFIER_PUBLIC (%d) 0: AST_PROP_ELEM name: "i" default: 2 docComment: null 1: AST_PROP_ELEM name: "j" default: null docComment: null 1: AST_PROP_DECL flags: MODIFIER_PUBLIC | MODIFIER_STATIC (%d) 0: AST_PROP_ELEM name: "s" default: null docComment: null 2: AST_PROP_DECL flags: MODIFIER_PRIVATE (%d) 0: AST_PROP_ELEM name: "it" default: null docComment: null 3: AST_PROP_DECL flags: MODIFIER_PROTECTED (%d) 0: AST_PROP_ELEM name: "row" default: null docComment: null 4: AST_PROP_DECL flags: MODIFIER_PUBLIC (%d) 0: AST_PROP_ELEM name: "o" default: null docComment: null 5: AST_PROP_DECL flags: MODIFIER_PRIVATE | MODIFIER_STATIC (%d) 0: AST_PROP_ELEM name: "normal" default: AST_CONST name: AST_NAME flags: NAME_NOT_FQ (1) name: "null" docComment: null __declId: 0 But the type property should be set in version 70 AST_STMT_LIST 0: AST_NAMESPACE name: "Foo" stmts: null 1: AST_CLASS name: "test" docComment: null extends: null implements: null stmts: AST_STMT_LIST 0: AST_PROP_GROUP flags: MODIFIER_PUBLIC (%d) type: AST_TYPE flags: TYPE_LONG (4) props: AST_PROP_DECL 0: AST_PROP_ELEM name: "i" default: 2 docComment: null 1: AST_PROP_ELEM name: "j" default: null docComment: null 1: AST_PROP_GROUP flags: MODIFIER_PUBLIC | MODIFIER_STATIC (%d) type: AST_NULLABLE_TYPE type: AST_TYPE flags: TYPE_STRING (6) props: AST_PROP_DECL 0: AST_PROP_ELEM name: "s" default: null docComment: null 2: AST_PROP_GROUP flags: MODIFIER_PRIVATE (%d) type: AST_NULLABLE_TYPE type: AST_TYPE flags: TYPE_ITERABLE (%d) props: AST_PROP_DECL 0: AST_PROP_ELEM name: "it" default: null docComment: null 3: AST_PROP_GROUP flags: MODIFIER_PROTECTED (%d) type: AST_NAME flags: NAME_NOT_FQ (1) name: "Row" props: AST_PROP_DECL 0: AST_PROP_ELEM name: "row" default: null docComment: null 4: AST_PROP_GROUP flags: MODIFIER_PUBLIC (%d) type: AST_NAME flags: NAME_FQ (0) name: "stdClass" props: AST_PROP_DECL 0: AST_PROP_ELEM name: "o" default: null docComment: null 5: AST_PROP_GROUP flags: MODIFIER_PRIVATE | MODIFIER_STATIC (%d) type: null props: AST_PROP_DECL 0: AST_PROP_ELEM name: "normal" default: AST_CONST name: AST_NAME flags: NAME_NOT_FQ (1) name: "null" docComment: null __declId: 0