Re: [PHP-DEV] [RFC] Class instances counter

2013-04-30 Thread Patrick ALLAERT
2013/4/10 Frank Liepert frank.liep...@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

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-10 Thread Lazare Inepologlou
2013/4/10 Frank Liepert frank.liep...@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

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-09 Thread Joe Watkins
On 04/09/2013 01:53 AM, David Muir wrote: On 09/04/13 10:29, Joe Watkins wrote: On 04/08/2013 09:07 PM, Madara Uchiha wrote: I'm with Morrison, I see no actual use for this. It's cool, but what would you use it for? On Mon, Apr 8, 2013 at 10:47 PM, Levi Morrison morrison.l...@gmail.com

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-09 Thread Laruence
if a class need that, it can implement a interface like instance_counter, which will simply can implement like: class A { public static $instance_counter = 0; public function __construct() { self::$instance_counter++; } public function __destruct() { self::$instance_counter--; };

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-09 Thread Joe Watkins
On 04/09/2013 11:23 AM, Laruence wrote: if a class need that, it can implement a interface like instance_counter, which will simply can implement like: class A { public static $instance_counter = 0; public function __construct() { self::$instance_counter++; } public function

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-08 Thread Levi Morrison
I see little value in having a function that tells me how many objects of any kind I have instantiated. Mostly, I see it as a way to help teach people about assignment of objects works in PHP: $a = new MyClass(); $b = $a; var_dump(get_object_count()); And that's about the sum of how

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-08 Thread Madara Uchiha
I'm with Morrison, I see no actual use for this. It's cool, but what would you use it for? On Mon, Apr 8, 2013 at 10:47 PM, Levi Morrison morrison.l...@gmail.com wrote: I see little value in having a function that tells me how many objects of any kind I have instantiated. Mostly, I see it as a

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-08 Thread Sherif Ramadan
On Mon, Apr 8, 2013 at 4:07 PM, Madara Uchiha dor.tchi...@gmail.com wrote: I'm with Morrison, I see no actual use for this. It's cool, but what would you use it for? On Mon, Apr 8, 2013 at 10:47 PM, Levi Morrison morrison.l...@gmail.com wrote: I see little value in having a function that

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-08 Thread Joe Watkins
On 04/08/2013 09:07 PM, Madara Uchiha wrote: I'm with Morrison, I see no actual use for this. It's cool, but what would you use it for? On Mon, Apr 8, 2013 at 10:47 PM, Levi Morrison morrison.l...@gmail.com wrote: I see little value in having a function that tells me how many objects of any

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-08 Thread David Muir
On 09/04/13 10:29, Joe Watkins wrote: On 04/08/2013 09:07 PM, Madara Uchiha wrote: I'm with Morrison, I see no actual use for this. It's cool, but what would you use it for? On Mon, Apr 8, 2013 at 10:47 PM, Levi Morrison morrison.l...@gmail.com wrote: I see little value in having a function