Re: Re: protected/private access and var_dump/print_r
| From: | Andrey Hristov | Date: | Thu, 20 May 2004 18:15:41 +0000 |
| Subject: | Re: Re: protected/private access and var_dump/print_r | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9978@lists.php.net to get a copy of this message | ||
Sara Golemon wrote:
Already commitedsinceI hope that everyone will be happy with this. var_dump() is still BCI sure hope noone is, but worst case scenario (on protected/public) is that the variable name looks wrong to an application. Since they didn't have those to begin with it's not so-much taking anything away from them. On the patch: +1it does not print ":public" on public properties.Fine with me. I'm not sure printing public is a bad idea. How many ppl actually use this in their application for purposes other than debugging?
As to printing :public on public props I'm -1 on that. There's no benefit from tacking on those extra characters and people are familiar with the current syntax. Besides, it's what print_r() has been doing for some time now so those that truly care have had an opporotunity to accomodate to that style.I have included in the patch the :public behaviour but now some testcases fail (they don't expect ":public" and also some does not expect private/protected variables to be dumped). So, what we decide, with :public or without it? I hope we can have a decision soon :) Andrey