Re: RFC Operator Overloading in Userspace

From: Date: Sun, 03 Jan 2016 05:39:22 +0000
Subject: Re: RFC Operator Overloading in Userspace
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-89975@lists.php.net to get a copy of this message
> BTW, I don't think for GMP right now += modifies existing object. > I guess it may be possible to implement it the other way (not sure). > It doesn't. As seen below, we get a new, second object on the assign_add. Wrong behavior IMO, but something to fix separately from this. $g = gmp_init(123); var_dump($g); // object(GMP)#1 { ["num"]=> 123 } $g += 1; var_dump($g); // object(GMP)#2 { ["num"]=> 124 } -Sara

« previous php.internals (#89975) next »