Re: [RFC] Class instances counter
| From: | Patrick ALLAERT | Date: | Tue, 30 Apr 2013 17:37:48 +0000 |
| Subject: | Re: [RFC] Class instances counter | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67219@lists.php.net to get a copy of this message | ||
2013/4/10 Frank Liepert <Frank.Liepert@gmx.de>:
> Hello internals,
>
> again an update on the RFC, see
> https://wiki.php.net/rfc/instance_counter:
>
> - added support for object as argument
> - added support for array argument (indexed array with class names)
> - added more code examples
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
I'm all for the addition of the get_objects_count() function, but I
would also like to see the feature of seeing how many times classes
(or a (set of) specific class(es)) has been instantiated and not only
the current existing number of instances.
This is a bit more work than the current scope since a global counter
needs to be added, but I think this can be a very useful piece of
information and is a feature that is very close to the one proposed
here.
This could be achieved in an entirely different function, or in the
same one, provided that we add an argument (boolean or bitmask options
flag).
Before voting, I'd like to hear others' opinions about this since it
might impact the current design.
Regards,
Patrick