3 ms·
An Alternative to the Singleton Anti-Pattern
- aespinoza 13y agoIt is really not an alternative in the sense of the Singleton Pattern. It is an alternative implementation of the Singleton Pattern in PHP. We have been doing this in C# for a while: http://neonlabs.structum.net/blog/implementing-a-singleton-in-c-reloaded/ http://neonlabs.structum.net/blog/implementing-a-singleton-i... But it is still a singleton. It is just a safer way of implementing it. The implementation still suffers from the Singleton Pattern disadvantages.