Count number of times a PHP class is created

awoo23

New Member
I've got a php class that I create several instances for. I'd like to get a count of how many times I've created that object.\[code\]<?php class myObject { //do stuff } $object1 = new myObject; $object2 = new myObject; $object3 = new myObject;?>\[/code\]Is there a way to find that I've created 3 myObjects?
 
Back
Top