php-src/Zend/tests/attributes/032_attribute_validation_scope.phpt
Nikita Popov f06afc434a Don't use scope when validating Attribute
This is not safe to do at this point. Even if we made it safe,
we'd see inconsistencies due to a partially compiled class.

Fixes oss-fuzz #28129.
2020-12-01 11:49:27 +01:00

9 lines
245 B
PHP

--TEST--
Validation for "Attribute" does not use a scope when evaluating constant ASTs
--FILE--
<?php
#[Attribute(parent::x)]
class x extends y {}
?>
--EXPECTF--
Fatal error: Cannot access "parent" when no class scope is active in %s on line %d