php-src/ext/reflection/tests/ReflectionAttribute_final.phpt
Nikita Popov 236ddc56a2 Preserve original ce_flags when registering class
Bug that regularly sneaks in: ZEND_ACC_FINAL is set before calling
zend_register_internal_class() and promptly gets ignored. Remove
this footgun by preserving flags from the original CE.
2020-07-20 17:00:04 +02:00

10 lines
213 B
PHP

--TEST--
Check that ReflectionAttribute is final
--FILE--
<?php
class T extends ReflectionAttribute {}
?>
--EXPECTF--
Fatal error: Class T may not inherit from final class (ReflectionAttribute) in %s on line %d