On 26-06-19 23:22, Arnold Daniels wrote: > > I would argue the following; The explicit use of the strict_operator is > intentional, meaning that the author consciously chose to be strict and > does not expect some operators to still be non-strict. The issues pointed > out, apply to all comparison operators. Ignoring == and != in the RFC > creates an inconsistency, while not properly addressing those concerns.
Yes, I guess you're right about treating all operators in a strict way with a simpler set of rules is more consistent. Concerning the issue with copying existing code into a file that uses stricter interpretation of the code: I think this should be regarded as performing an upgrade of the code that is being copied. No problem in my view. In the section about widening the scope you address the type juggling that happens on array access, like $array[12.34]. One could argue that accessing an array item by key is implicit use of the == operator, just like a switch statement is. I would love to see it included in the main proposal in stead of proposing it as part of a different directive. The change in behavior could be similar to what is proposed for the switch statement: Array keys are compared using the === operator. Regards, Dik Takken -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php