Hi!

> <https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#user-content-relational-operators>

Ah, I forgot that the spec did define it via array comparison. The spec
also says in
https://github.com/php/php-langspec/blob/master/spec/08-conversions.md#converting-to-array-type:

The order of insertion of the elements into the array is the lexical
order of the instance properties in the class-member-declarations list.

It does not explicitly say array conversion using when comparing, but
reasonable reader would certainly assume so.

So looks like this part of the spec is violated, and I stand corrected -
it's actually defined in this case, and should be fixed to follow the
spec. I still think it makes little sense, but we have the spec, so we
have to follow the spec.

In this case, it's ok to fix it in all active versions - the spec wins I
think. Or, we have to change the spec :)
-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to