Skip to content

Commit ba205f4

Browse files
committed
fix: add "resource" to reserved class names
The "resource" type keyword should be treated as a reserved class name to prevent it from being used as a class name, consistent with other built-in type keywords like "mixed", "object", and "iterable".
1 parent 85b681a commit ba205f4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Zend/zend_compile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ static const struct reserved_class_name reserved_class_names[] = {
215215
{ZEND_STRL("iterable")},
216216
{ZEND_STRL("object")},
217217
{ZEND_STRL("mixed")},
218+
{ZEND_STRL("resource")},
218219
/* These are not usable as class names because they're proper tokens,
219220
* but they are here for class aliases. */
220221
{ZEND_STRL("array")},

0 commit comments

Comments
 (0)