I only put one class per file as a rule of life for php. I actually tried doing it with two or multiple classes and it got way to hard to deal with and I couldn't end up finding anything.
I am just discovering PHP 5 and class interfaces (php variety) so I will be adjusting my architecture to reflect some of the new capabilities.
I have settled into using the following format
1 class per file
Each class must define a constant of the form INSTALLED_CLASSNAME
Each child class will check for the constant or die
Each class will also check for any configuration files needed or function groups.
Configuration files must be of the form classname.config.php
Configuration should be external to the class for possible exposure from cpls etc.
Function groups may contain function that are of a similar variety.
I divide all of this up into different directories and load with a breadth first search of the directories.
Anyway I think this can be adjusted. I didn't even know about the __autoload function...
Planetsim, the 0 was a numeric index as the push / pop do not modify the base array structure and the shift unshift always reset / clean the stack so that the numeric index of inplay elements is 0.
Do php4 flavors allow for class interfaces?
P.S. I use constants because I have a great fear of putting any paths / including relative into a file that I plan to drag all over the place. I didn't know about the class_exists either when I began doing this, but I suspect checking a constant may be quicker that perusing the heap for the existance of a class loaded in memory.
Thanks,
Geoffrey