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]
23 lines
254 B
PHP
23 lines
254 B
PHP
--TEST--
|
|
#[\Override]: enum with matching interface.
|
|
--FILE--
|
|
<?php
|
|
|
|
interface I {
|
|
public function e(): void;
|
|
}
|
|
|
|
enum E implements I {
|
|
case One;
|
|
case Two;
|
|
|
|
#[\Override]
|
|
public function e(): void {}
|
|
}
|
|
|
|
echo "Done";
|
|
|
|
?>
|
|
--EXPECT--
|
|
Done
|