Jump to content
Larry Ullman's Book Forums

Access All Objects Of A Class

Recommended Posts


using a static counter variable in a class lets us to count the number of objects created so far


is there a way to to access all Live objects instantiated from a class.(not just the number of them but the names of them !)

i want to write a simple code for a human class . and in its __construct method i want that object to say hello to all previously created objects!

Link to comment
Share on other sites


  • Create New...