Annotation of embedaddon/php/tests/classes/final.phpt, revision 1.1
1.1 ! misho 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:
! 8: class first {
! 9: function show() {
! 10: echo "Call to function first::show()\n";
! 11: }
! 12: }
! 13:
! 14: $t = new first();
! 15: $t->show();
! 16:
! 17: class second extends first {
! 18: final function show() {
! 19: echo "Call to function second::show()\n";
! 20: }
! 21: }
! 22:
! 23: $t2 = new second();
! 24: $t2->show();
! 25:
! 26: echo "Done\n";
! 27: ?>
! 28: --EXPECTF--
! 29: Call to function first::show()
! 30: Call to function second::show()
! 31: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>