Re: Re: protected/private access and var_dump/print_r

From: Date: Thu, 20 May 2004 19:57:01 +0000
Subject: Re: Re: protected/private access and var_dump/print_r
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-9980@lists.php.net to get a copy of this message
Hello Andrey, Thursday, May 20, 2004, 8:15:41 PM, you wrote: > Sara Golemon wrote: >>>>I hope that everyone will be happy with this. var_dump() is still BC >> >> since >> >>>>it 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? >>> >> >> I 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: +1 > Already commited >> >> 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 :) What ever we decide i suggest you fix the errors now - it may take a while until we have decided and a lot of failing tests is very bad. Best regards, Marcus mailto:helly@php.net

« previous php.internals (#9980) next »