Singleton Classes in PHP

Tutorials Shared by the Internet Community

Advertisements


Synopsis

This tutorial describes how to create and use singleton classes in PHP.

Statistics

  • Total Hits - 17078

  • Total Votes - 102 votes

  • Vote Up - 46 votes

  • Vote Down - 56 votes

  • Domain - www.apphp.com

  • Category - PHP/Object Oriented

  • Submitted By - Chara Miteo

  • Submitted on - 2013-05-26 17:36:47

Description

This tutorial describes how to create and use singleton classes in PHP. In this tutorial we'll learn how to create and use singleton classes. A singleton class is a class that can be instantiated only once. This is may be useful when only one object of certain class is needed to coordinate across your system. While it may not come up frequently, it can be a useful technique when it simply doesn't make sense to have more than one instance of a class. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements