Annotation of embedaddon/php/tests/classes/abstract_static.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ZE2 A static abstract methods
! 3: --FILE--
! 4: <?php
! 5:
! 6: interface showable
! 7: {
! 8: static function show();
! 9: }
! 10:
! 11: class pass implements showable
! 12: {
! 13: static function show() {
! 14: echo "Call to function show()\n";
! 15: }
! 16: }
! 17:
! 18: pass::show();
! 19:
! 20: eval('
! 21: class fail
! 22: {
! 23: abstract static function func();
! 24: }
! 25: ');
! 26:
! 27: fail::show();
! 28:
! 29: echo "Done\n"; // shouldn't be displayed
! 30: ?>
! 31: --EXPECTF--
! 32: Call to function show()
! 33:
! 34: Strict Standards: Static function fail::func() should not be abstract in %sabstract_static.php(%d) : eval()'d code on line %d
! 35:
! 36: 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
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>