1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/traits/abstract_method_3.phpt

19 lines
409 B
PHP

--TEST--
Private abstract method from trait enforced in class
--FILE--
<?php
trait T {
abstract private function neededByTheTrait(int $a, string $b);
}
class C {
use T;
private 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