mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
c95b4ace40
# It's the last one now, thus the traits can be used to implement interfaces
25 lines
399 B
PHP
25 lines
399 B
PHP
--TEST--
|
|
Checking error message when the trait doesn't implements the interface
|
|
--FILE--
|
|
<?php
|
|
|
|
trait foo {
|
|
public function a() {
|
|
}
|
|
}
|
|
|
|
interface baz {
|
|
public function abc();
|
|
}
|
|
|
|
class bar implements baz {
|
|
use foo;
|
|
|
|
}
|
|
|
|
new bar;
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Class bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (baz::abc) in %s on line %d
|