George Schlossnagle wrote:
I'm not an OO expert, but doesn't this break a fundamental semantic of OOP -- namely that new() returns a new object of the specified class. Isn't this the whole reason that the Singleton pattern exists?
yeah I would agree that we should always try to find a non magic solution and in this case a singleton seems to be the obvious choice. however currently its kinda hard to write a singleton that will work even if you inherit from the base class that implements the singleton due to:
http://bugs.php.net/bug.php?id=30235
regards, Lukas
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php