mirror of
https://github.com/php/php-src.git
synced 2025-01-06 19:03:31 +08:00
26 lines
374 B
Plaintext
26 lines
374 B
Plaintext
|
--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
|