1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/attributes/override/011.phpt
Tim Düsterhus 49ef6e209d RFC: Add #[Override] attribute (#9836)
* Add #[Override] attribute

* Move #[\Override] tests into Zend/tests/attributes/override/

* Check `check_only` before removing `ZEND_ACC_OVERRIDE`

* NEWS/UPGRADING for #[\Override]
2023-06-29 20:23:53 +02:00

20 lines
321 B
PHP

--TEST--
#[\Override]: Parent method is private (2).
--FILE--
<?php
class P {
private function p(): void {}
}
class C extends P {
#[\Override]
private function p(): void {}
}
echo "Done";
?>
--EXPECTF--
Fatal error: C::p() has #[\Override] attribute, but no matching parent method exists in %s on line %d