Re: parent failer ?

From: Date: Wed, 05 Sep 2001 13:44:54 +0000
Subject: Re: parent failer ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66044@lists.php.net to get a copy of this message
btw. it works on a other server so it should be something in server configuration I use PHP Version 4.0.1pl2 configuration string './configure' '--target=i386-redhat-linux' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--disable-static' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--without-mysql' '--with-xml' "Jeroen Olthof" <j.olthof@millipede.nl> wrote in message news:20010905140112.27480.qmail@pb1.pair.com... > 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 (#66044) next »