1. CSS
  2. Flash
  3. HTML
  4. Illustrator
  5. Java
  6. JavaScript
  7. Maya
  8. Photography
  9. Photoshop
  10. PHP
  11. Ruby
  12. Ruby on Rails
  13. 3ds Max

PHP: Singleton Classes in PHP

  1. Clicks today:
    0
  2. Clicks this month:
    0
  3. Overall rating:
    4.67/5

PHP » Object Oriented Programming — over 4 years ago
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.

Comments

Your Comment

You must be logged in to post a comment.