mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
* Add #[Override] attribute * Move #[\Override] tests into Zend/tests/attributes/override/ * Check `check_only` before removing `ZEND_ACC_OVERRIDE` * NEWS/UPGRADING for #[\Override]
20 lines
225 B
PHP
20 lines
225 B
PHP
--TEST--
|
|
#[\Override]: Valid anonymous class.
|
|
--FILE--
|
|
<?php
|
|
|
|
interface I {
|
|
public function i(): void;
|
|
}
|
|
|
|
new class () implements I {
|
|
#[\Override]
|
|
public function i(): void {}
|
|
};
|
|
|
|
echo "Done";
|
|
|
|
?>
|
|
--EXPECT--
|
|
Done
|