PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Singleton Classes in PHP

Article Comments (1 total)

idont, 24 March 2010

Singleton is the worst "best pattern" I now have to remove from my code. Singleton allow bad architecture, encourage not reusable code and prevent code to be tested correctly. To understand why, check this video: http://www.youtube.com/watch?v=acjvKJiOvXw

Submit a Comment
Use the following form to submit a comment for this article. You can include any required code snippets, which we will format and highlight accordingly.


Note: Before your comment appears on PhpRiot, it must be manually approved. The email address field is optional. If you choose to include it, it will be displayed obfuscated to protect it from spammers.

Singleton Classes in PHP