abstract_static.phpt 590 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. ZE2 A static abstract methods
  3. --FILE--
  4. <?php
  5. interface showable
  6. {
  7. static function show();
  8. }
  9. class pass implements showable
  10. {
  11. static function show() {
  12. echo "Call to function show()\n";
  13. }
  14. }
  15. pass::show();
  16. eval('
  17. class fail
  18. {
  19. abstract static function func();
  20. }
  21. ');
  22. fail::show();
  23. echo "Done\n"; // shouldn't be displayed
  24. ?>
  25. --EXPECTF--
  26. Call to function show()
  27. Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::func) in %sabstract_static.php(%d) : eval()'d code on line %d