In my opinion, another key takeaway: inheritance as a code reuse mechanism can really bite you. SplStack extends SplDoublyLinkedList and this exposes a bunch of methods on a stack that don't make any sense. It also means there are constraints on how well you can optimize the stack, because you have these methods that don't make sense on a stack that you _must_ support because some poor bloke somewhere actually used them (may God have mercy on them).
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php