1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Files
archived-php-src/Zend/tests/traits/abstract_method_1.phpt
T

19 lines
399 B
PHP

--TEST--
Abstract method from trait enforced in class
--FILE--
<?php
trait T {
abstract public function neededByTheTrait(int $a, string $b);
}
class C {
use T;
public function neededByTheTrait(array $a, object $b) {}
}
?>
--EXPECTF--
Fatal error: Declaration of C::neededByTheTrait(array $a, object $b) must be compatible with T::neededByTheTrait(int $a, string $b) in %s on line %d