Posted by Eli on 03/16/05 01:06
Hi,
<?php
class A
{
public function func() { echo "A"; }
}
class B extends A
{
public function func() { echo "B"; }
}
$cls=new B();
$cls->func(); //echo: B
?>
How can I call func() of class A from $cls object (that when I call
func() it will echo "A" and not "B")?
Changing functions names or declaring another function in class B that
will call parent::func() are not good for me.
-thanks, Eli
[Back to original message]
|