php-8.0.30-src/Zend/tests/traits/abstract_method_5.phpt

19 lines
329 B
PHP

--TEST--
Staticness enforcement on abstract trait methods
--FILE--
<?php
trait T {
abstract static public function method(int $a, string $b);
}
class C {
use T;
public function method(int $a, string $b) {}
}
?>
--EXPECTF--
Fatal error: Cannot make static method T::method() non static in class C in %s on line %d