sure, you can try with brad's script, removing his includes. this gives the following files, all in the same directory:
Foo.php <? class Foo{} ?> MyFoo.php <? class MyFoo extends Foo {} ?> index.php <? function __autoload($name) { include_once("$name.php"); } $b = new MyFoo(); ?> when you call index.php, it crashes with the following error: <br /> <b>Fatal error</b>: Class myfoo: Cannot inherit from undefined class foo in <b>c:\webroot\ze2\myfoo.php</b> on line <b>2</b><br /> I'm working with the 4.3.0 alpha with ZE2 released on 02/07/2002 on windows 2000 with apache 1.3.24 > -----Original Message----- > From: Andi Gutmans [mailto:[EMAIL PROTECTED]] > Sent: vendredi 16 août 2002 18:04 > To: phpsurf; Brad LaFountain; Ivan Ristic > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [Zend Engine 2] RE: [PHP-DEV] Re: [Zend Engine 2] RE: [PHP-DEV] > REPOST: Class Autoloading [PATCH] > > > At 06:24 PM 8/7/2002 +0200, phpsurf wrote: > >Hi > > > >I'm testing this great feature ... > >but unfortunately, it lokos like it doesn't work for extended > classes either > >! > > > >in brad's example (in the history of this mail) > >you cannot remove the include_once statements in the children classes (I > >would rather replace them with the apropriate call to the __autoload > >function) > > > >the class MyFoo extends Foo > >when you try to instantiate Foo, __autoload works perfectly. > >but when you try to instantiate MyFoo, it fails with the > following message: > >"Fatal error: Class myfoo: Cannot inherit from undefined class foo in > >c:\webroot\ze2\myfoo.php on line 2" > > > >andi ? is it not supposed to work either with extended classes ? > > Can you please send me a very short script which reproduces your problem? > > Thanks, > > Andi > > > > -----Original Message----- > > > From: Andi Gutmans [mailto:[EMAIL PROTECTED]] > > > Sent: mercredi 26 juin 2002 21:02 > > > To: Brad LaFountain; Ivan Ristic; phpsurf > > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > > Subject: Re: [PHP-DEV] Re: [Zend Engine 2] RE: [PHP-DEV] REPOST: Class > > > Autoloading [PATCH] > > > > > > > > > Hey, > > > > > > What I meant was nested classes, my bad :) > > > I meant it won't work for Foo::Bar::Barbara but only for class Foo. > > > > > > Andi > > > > > > At 11:56 AM 6/26/2002 -0700, Brad LaFountain wrote: > > > > > - will never work for sub-classes so don't even ask!!!!! > > > > > > > >Andi, > > > > > > > > This doesn't need to be an issue. The way that I use > > > sub-classes is I ALWAYS > > > >include_once("subclass.php"); at the top of each superclass > file. I know > > > >everyone doesn't code the same way but maybe you can have that > > > as a suggestion > > > >to people who use __autoload. > > > > > > > >Foo.php > > > >class Foo{} > > > > > > > >Bar.php > > > >class Bar{} > > > > > > > >MyFoo.php > > > >include_once("Foo.php"); > > > >class MyFoo extends Foo{} > > > > > > > >MyBar.php > > > >include_once("Bar.php"); > > > >class MyBar extends Bar{} > > > > > > > > > > > >auto_test.php > > > ><? > > > >function __autoload($name) { > > > > include_once("$name.php"); > > > >} > > > >$f = new MyFoo(); > > > >$b = new MyBar(); > > > >?> > > > > > > > >- brad > > > > > > > > > > At 11:27 PM 6/11/2002 +0100, Ivan Ristic wrote: > > > > > > > Okay, I guess I can live with it :) > > > > > > > > > > > > > > Andi > > > > > > > > > > > > Is there anyone else who would like to comment on the > > > > > > patch? > > > > > > > > > > > > http://www.webkreator.com/download/class_autoload.patch > > > > > > > > > > > > Or can we have it committed? > > > > > > > > > > > >-- > > > > > >Ivan Ristic, [EMAIL PROTECTED] > > > > > >[ Weblog on PHP, Software development, Intranets, > > > > > >and Knowledge Management: http://www.webkreator.com ] > > > > > > > > > > > > > > > > > >-- > > > > > >PHP Development Mailing List <http://www.php.net/> > > > > > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > -- > > > > > PHP Development Mailing List <http://www.php.net/> > > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > > >__________________________________________________ > > > >Do You Yahoo!? > > > >Yahoo! - Official partner of 2002 FIFA World Cup > > > >http://fifaworldcup.yahoo.com > > > > > > > > > -- > > > PHP Development Mailing List <http://www.php.net/> > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > >_________________________________________________________________ > _____________ > >i (france), c'est aussi une gamme complète de PC en exclusivité avec DELL > >http://www.ifrance.com/_reloc/signedell > ______________________________________________________________________________ Pour mieux recevoir vos emails, utilisez un PC plus performant ! Découvrez la nouvelle gamme DELL en exclusivité sur i (france) http://www.ifrance.com/_reloc/signedell -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php