mirror of
https://github.com/php/php-src.git
synced 2024-10-17 14:32:37 +00:00
25 lines
414 B
Plaintext
25 lines
414 B
Plaintext
|
--TEST--
|
||
|
Method conflict in traits
|
||
|
--FILE--
|
||
|
<?php
|
||
|
error_reporting(E_ALL);
|
||
|
|
||
|
trait THello1 {
|
||
|
private function hello() {
|
||
|
echo 'Hello';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
trait THello2 {
|
||
|
private function hello() {
|
||
|
echo 'Hello';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class TraitsTest {
|
||
|
use THello1;
|
||
|
use THello2;
|
||
|
}
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Warning: Trait method hello has not been applied, because there are collisions with other trait methods on TraitsTest in %s on line %d
|