parent failer ?

From: Date: Wed, 05 Sep 2001 13:35:34 +0000
Subject: parent failer ?
Groups: php.general 
Request: Send a blank email to php-general+get-66040@lists.php.net to get a copy of this message
hi, again (sorry) when I run this code (straight from the manual) <? class A { function example() { echo "I am A::example() and provide basic functionality.<br>\n"; } } class B extends A { function example() { echo "I am B::example() and provide additional functionality.<br>\n"; parent::example(); } } $b = new B; // This will call B::example(), which will in turn call A::example(). $b->example(); ?> the result wil be I am B::example() and provide additional functionality. Fatal error: Undefined class name 'parent' test.php on line 15 what is going wrong here ??? kind regards Jeroen Olthof

« previous php.general (#66040) next »