added the singleton pattern in php