See the following;
PHP 4 Singleton: http://www.phppatterns.com/index.php/article/articleview/6/1/1/
PHP 5 Singleton: http://www.sitepoint.com/article/1192/9 (broken) Try http://phpadvocate.com/blog/2011/04/php-using-a-singleton-pattern-with-oop/
PHP 4 Singleton Registry: http://www.phppatterns.com/index.php/article/articleview/75/1/1/