Hi Marc,
Marc Bennewitz wrote:
Personally I would like to have a more reasonable way in general. No
special case and no magic method.
So my proposal then would be to try to add a class cast operator (needs
an own RFC) and later to with this approach on var_export.
I've wondered if this would
Hi!
> Additionally I feel that adding methods to stdClass will muddy the waters
> -- for example, this means that extending stdClass is no longer entirely
> unreasonable, as you might want to do it to reuse the __set_state()
> implementation. Not something I want to see happening.
I'm afraid that
On Tue, Mar 14, 2017 at 11:20 PM, Derick Rethans wrote:
> On Tue, 14 Mar 2017, Andrea Faulds wrote:
>
> > Hi everyone,
> >
> > Since stdClass has no __set_state method, var_export() produces unusable
> > output if given an object of that class. I wrote a patch that would make
> > var_export() pro
On Tue, 14 Mar 2017, Andrea Faulds wrote:
> Hi everyone,
>
> Since stdClass has no __set_state method, var_export() produces unusable
> output if given an object of that class. I wrote a patch that would make
> var_export() produce a cast to object instead, which could be evaluated to get
> back
Am 14.03.2017 um 20:26 schrieb Fleshgrinder:
On 3/14/2017 7:57 PM, Andrea Faulds wrote:
Hi everyone,
Since stdClass has no __set_state method, var_export() produces unusable
output if given an object of that class. I wrote a patch that would make
var_export() produce a cast to object instead,
On 3/14/2017 7:57 PM, Andrea Faulds wrote:
> Hi everyone,
>
> Since stdClass has no __set_state method, var_export() produces unusable
> output if given an object of that class. I wrote a patch that would make
> var_export() produce a cast to object instead, which could be evaluated
> to get back
Hi everyone,
Since stdClass has no __set_state method, var_export() produces unusable
output if given an object of that class. I wrote a patch that would make
var_export() produce a cast to object instead, which could be evaluated
to get back a stdClass:
https://github.com/php/php-src/pull/2