File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug42937.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month 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: Bug #42937 (__call() method not invoked when methods are called on parent from child class)
    3: --FILE--
    4: <?php
    5: class A {
    6: 	function __call($strMethod, $arrArgs) {
    7: 		echo "$strMethod\n";
    8: 	}
    9: }
   10: 
   11: class C {
   12: 	function __call($strMethod, $arrArgs) {
   13: 		echo "$strMethod\n";
   14: 	}
   15: }
   16: 
   17: class B extends A {
   18: 	function test() {
   19: 		self::test1();
   20: 		parent::test2();
   21: 		static::test3();
   22: 		A::test4();
   23: 		B::test5();
   24: 		C::test6();
   25: 	}
   26: }
   27: 
   28: $a = new A();
   29: $a->test();
   30: 
   31: $b = new B();
   32: $b->test();
   33: ?>
   34: --EXPECTF--
   35: test
   36: test1
   37: test2
   38: test3
   39: test4
   40: test5
   41: 
   42: Fatal error: Call to undefined method C::test6() in %sbug42937.php on line 21

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>