mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
7aacc705d0
Closes GH-5958
27 lines
377 B
PHP
27 lines
377 B
PHP
--TEST--
|
|
Bug #71414 (Interface method override inherited method and implemented in a trait causes fatal error)
|
|
--FILE--
|
|
<?php
|
|
interface InterfaceY {
|
|
public function z(): string;
|
|
}
|
|
|
|
trait TraitY {
|
|
public function z(): string {
|
|
}
|
|
}
|
|
|
|
class X {
|
|
public function z() {
|
|
}
|
|
}
|
|
|
|
class Y extends X implements InterfaceY {
|
|
use TraitY;
|
|
}
|
|
|
|
echo "ok";
|
|
?>
|
|
--EXPECT--
|
|
ok
|