1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 04:51:03 +02:00
Files
archived-php-src/Zend/tests/traits/bug60217b.phpt

27 lines
502 B
PHP

--TEST--
Bug #60217 (Requiring the same method from different traits and abstract methods have to be compatible)
--FILE--
<?php
trait TBroken1 {
public abstract function foo($a);
}
trait TBroken2 {
public abstract function foo($a, $b = 0);
}
class CBroken {
use TBroken1, TBroken2;
public function foo($a) {
echo 'FOO';
}
}
$o = new CBroken;
$o->foo(1);
--EXPECTF--
Fatal error: Declaration of TBroken1::foo($a) must be compatible with TBroken2::foo($a, $b = 0) in %s