On Sat, Aug 11, 2018 at 8:34 AM, Christoph M. Becker <cmbecke...@gmx.de> wrote: >> 2. Is it a bug introduced in 5.4 that's okay to fix? Or would fixing >> it count as a BC break due to how long it's been broken? (I say >> fixable bug, the BC break was at 5.4) > > I tend to agree, even though the behavior is not really documented. The > php.net manual says nothing about the ordering of objects, and the > language specification isn't clear about that, since it refers to array > comparison, but doesn't define the order of the properties. Are > properties of parent classes inserted before the properties of child > classes? Are ad-hoc properties inserted after the predefined ones? Are > trait properties inserted where the are “use”d? Are invisible > properties also part of the comparison? > >  > <https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#user-content-relational-operators> > Yeah, that's why I'm hesitant on just slapping a bug fix on it and apply to 7.1+ without asking for input. If this were a younger regression I might just do it and move on, but 5.4-7.2 is a six release branches.
FWIW, objects with ad-hoc properties are not impacted by this since they automatically have a HashTable for their properties. This only impacts fully defined classes (the best kind) who have not had their shadow table materialized (also the best kind). PR, by the way: https://github.com/php/php-src/pull/3434 -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php