RE: [PHP-DEV] Re: [VOTE] Userspace operator overloading

From: Date: Thu, 26 Mar 2020 17:36:27 +0000
Subject: RE: [PHP-DEV] Re: [VOTE] Userspace operator overloading
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-109347@lists.php.net to get a copy of this message
On Thursday, March 26, 2020 6:19 PM Guilliam Xavier <guilliam.xavier@gmail.com> wrote: >> If the concat operator is not overloaded, the behavior is like now, and the objects are >> converted implicitly to strings (so $a . $b actually means (string) $a . (string) $b). >> Furthermore an notice is triggered, hinting the user that he could overload the concat >> operator. (Maybe here a different message than for the other operators would be useful). > > I fear that "hint" notice could break Symfony apps... Couldn't you just not > trigger it in this case? Yes this would be possible and I think that it might be reasonable to omit the notice in this case (maybe only if the objects really implement a __toString). What do others think about this? Regards, Jan

« previous php.internals (#109347) next »