Re: Can I use Functional Pointer? / Javascript bracelet conflict ?

From: Date: Tue, 16 May 2000 11:17:16 +0000
Subject: Re: Can I use Functional Pointer? / Javascript bracelet conflict ?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-89@lists.php.net to get a copy of this message
Lin Zhemin wrote: > > Den dobry, Jan. :-) Dobry den :-) (I'm sorry I don't know the greeting in your language.) > However, there's another confusion. I know that PHP won't > initialise a derived object, but I'm worried that I'm not sure > if it's a waste of resource that I initialise the derived object > each time a deriving object needs to use some of the statistic > functions of the derived object. Like in line 9: > > 1 class A { > 2 function A() { echo "A::constructor<br>"; } > 3 function funca() { echo "A::funca<br>"; } > 4 } > 5 > 6 class B extends A { > 7 function B() { echo "B::constructor<br>"; } > 8 function funca() { echo "B::funca<br>"; } > 9 function functry() { $fp = new A; $fp->funca(); $this->funca(); } > 10 } > 11 > 12 $a = new B; > 13 $a->functry(); > > Is there a better solution? Thanks a lot! Yes. See the user comments at http://www.php.net/manual/oop.php . Jan

« previous php.general (#89) next »