[PHP-DEV] [RFC] Class instances counter

2013-04-08 Thread Frank Liepert
https://wiki.php.net/rfc/instance_counter -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

[PHP-DEV] trigger_error() enhancements

2013-04-08 Thread Thomas Anderson
I was thinking it'd be useful if people could switch between throwing exceptions and displaying errors. If throw were a function and not a language construct one could do $function($error) where $function was a string equal to either 'trigger_error' or 'throw'. But alas that's not possible. In

Re: [PHP-DEV] trigger_error() enhancements

2013-04-08 Thread Madara Uchiha
What's wrong with set_error_handler()? http://php.net/manual/en/function.set-error-handler.php (Aside for the fact that any uncaught warning would be fatal). On Mon, Apr 8, 2013 at 11:51 PM, Thomas Anderson zeln...@gmail.com wrote: I was thinking it'd be useful if people could switch between

Re: [PHP-DEV] trigger_error() enhancements

2013-04-08 Thread Thomas Anderson
That only addresses my first idea, however, one problem with it I see is that there's not as much fine tuned granularity with it. What if, for error produced by some functions, you wanted to display an HTML page showing the error and other errors you just wanted to silently log it to the DB or

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

[PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-08 Thread Laruence
Hey: bug is described at #64554 I proposal to add a leading backslash to all classnames (not only ns names, since no harm, consistent and make sense) when doing serialize, var_export etc. what do you think? thanks -- Laruence Xinchen Hui http://www.laruence.com/

Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-08 Thread Madara Uchiha
Sounds good. With PHP moving in closer and closer with namespaces, this proposal will save some confusion in the more complex application debugging. I support. +1 On Apr 9, 2013 6:29 AM, Laruence larue...@php.net wrote: Hey: bug is described at #64554 I proposal to add a leading