abstract_user_call.phpt 410 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. ZE2 An abstrcat method cannot be called indirectly
  3. --FILE--
  4. <?php
  5. abstract class test_base
  6. {
  7. abstract function func();
  8. }
  9. class test extends test_base
  10. {
  11. function func()
  12. {
  13. echo __METHOD__ . "()\n";
  14. }
  15. }
  16. $o = new test;
  17. $o->func();
  18. call_user_func(array($o, 'test_base::func'));
  19. ?>
  20. ===DONE===
  21. --EXPECTF--
  22. test::func()
  23. Fatal error: Cannot call abstract method test_base::func() in %s on line %d