Return to class_alias_011.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests |
1.1 ! misho 1: --TEST-- ! 2: Testing callback in alias ! 3: --FILE-- ! 4: <?php ! 5: ! 6: class foo { ! 7: static public function test() { ! 8: print "hello\n"; ! 9: } ! 10: public function test2() { ! 11: print "foobar!\n"; ! 12: } ! 13: } ! 14: ! 15: class_alias('FOO', 'bar'); ! 16: ! 17: call_user_func(array('bar', 'test')); ! 18: ! 19: ! 20: $a = new bar; ! 21: call_user_func(array($a, 'test2')); ! 22: ! 23: ?> ! 24: --EXPECT-- ! 25: hello ! 26: foobar!