use of $x <> $y vs. $x != $y
-
Just curious, I see both forms of comparison operators used throughout the code. grep -c tells me that
!=
is preferred by a wide margin. Yet I still see the other form used, even recently e.g. this commit.!=
definitely seems more correct to me, and has the additional form!==
to enforce type matching. I was wondering if there was a reason not to convert the remaining<>
s and put a note in the style guide under the php-specific section ? -
It's one of those things that is functionally equivalent and we haven't strictly standardized. Usually when a new commit adds it it's along side or near a place that used it in the past.
We probably should move them all to
!=
but it's not high on anyone's priority list. -
Ok, if nobody else wants to do it I'm happy to rip through them and get them all consistent.