Re: [PHP4BETA] Calling an Overloaded Method

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: [PHP4BETA] Calling an Overloaded Method
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-9497@lists.php.net to get a copy of this message
> 1. Is there documentation somewhere for all the new feature of php4 > (especially the object oriented enhancements). Slowly being added to www.php.net/manual/ > 2. Anyone know the syntax for calling an overloaded method from within a > child class? For Example, > > Class foo { > > function doIt() { > echo "test \n"; > } > } > > Class bar extends foo { > function doIt() { > > $parent->doIt() // <<<--- want to do something like this ! > echo "bar test"; > > } > } > > $b = new bar(); > $b->doIt(); > ---------------------------------- > result would be: > > test > bar test Just use: foo::doIt(); on the line in question. -Rasmus

« previous php.version4 (#9497) next »