bug69467.phpt 385 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #69467 (Wrong checked for the interface by using Trait)
  3. --FILE--
  4. <?php
  5. interface Baz {
  6. public function bad();
  7. }
  8. trait Bar{
  9. protected function bad(){}
  10. }
  11. class Foo implements Baz{
  12. use Bar;
  13. }
  14. $test = new Foo();
  15. var_dump($test instanceof Baz);
  16. ?>
  17. --EXPECTF--
  18. Fatal error: Access level to Foo::bad() must be public (as in class Baz) in %sbug69467.php on line %d