Annotation of embedaddon/php/tests/classes/final_redeclare.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ZE2 A final method may not be overwritten
! 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 pass {
! 9: final function show() {
! 10: echo "Call to function pass::show()\n";
! 11: }
! 12: }
! 13:
! 14: $t = new pass();
! 15:
! 16: class fail extends pass {
! 17: function show() {
! 18: echo "Call to function fail::show()\n";
! 19: }
! 20: }
! 21:
! 22: echo "Done\n"; // Shouldn't be displayed
! 23: ?>
! 24: --EXPECTF--
! 25: Fatal error: Cannot override final method pass::show() in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>