Re: [RFC] __debug_info()

From: Date: Wed, 22 Jan 2014 21:22:49 +0000
Subject: Re: [RFC] __debug_info()
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Derick,

On Thu, Jan 23, 2014 at 3:35 AM, Derick Rethans <[email protected]> wrote:

> > Hi all,
> >
> > Sorry for off topic.
> >
> > On Wed, Jan 22, 2014 at 6:37 AM, Lars Strojny <[email protected]> wrote:
> >
> > > Love it, two things: the var_dump() properties will be replaced (not
> > > merged) with the "real" properties in the object (I am asking as that
> would
> > > make it very very cool for stuff like doctrine, where lazy loaded
> entities
> > > are way too large to dump)? As for the name, I would prefer
> __debugInfo()
> > > as in __callStatic(). I know there is __set_state() but that's
> something
> > > that needs deprecation and fixing :)
> >
> >
> > Could anyone add __setState() for 5.6?
>
> Why would you want to do that? If at all, all the *newer* methods should
> be __debug_info etc. __set_state was first and changing it to
> __setState() would mean that var_export'ed() variables in < PHP 5.6
> would now no longer work? Or the other way around? It's a cosmetic
> change that helps nobody—just like renaming other standard functions to
> make them more "organised".
>
> cheers,


I mean add alias for __set_state() to keep consistent names.
__set_state() should be there very long time or forever for compatibility.

It's small cosmetic change, but it would assure PHP to be a good
language to learn in the future. IMHO.

Anyway, I would like to write RFC for aliasing. Aliases may be added
in the future.

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (30 messages)

« previous php.internals (#71414) next »