You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
518 B

  1. --TEST--
  2. ZE2 A method may be redeclared final
  3. --SKIPIF--
  4. <?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
  5. --FILE--
  6. <?php
  7. class first {
  8. function show() {
  9. echo "Call to function first::show()\n";
  10. }
  11. }
  12. $t = new first();
  13. $t->show();
  14. class second extends first {
  15. final function show() {
  16. echo "Call to function second::show()\n";
  17. }
  18. }
  19. $t2 = new second();
  20. $t2->show();
  21. echo "Done\n";
  22. ?>
  23. --EXPECTF--
  24. Call to function first::show()
  25. Call to function second::show()
  26. Done