File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / classes / abstract_static.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    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>