codeguy/php-the-right-way — pull request #253 by FlorianWolters (2013-03-13 15:24:32+00:00)
Title: Enhanced the example for the Singleton design pattern.

* 7d91e9c: Removed trailing whitespaces
* 78b8adc: Enhanced the example for the Singleton design pattern.
- Moved static variable into the static creation method getInstance.
- Replaced "new self();" with "new static" (late static binding to allow subclassing).
- Changed visibility of __construct to protected.
- Added the two private methods __clone and __wakeup.
- Added DocBlock comments.
- Updated description and enhanced with links to the PHP manual.