I've always been using !=
as "not equal to" in C++ and PHP. I just realized <>
does the same thing. What's the difference?
Just in case if there is no difference, why does <>
exist?
They are the same, just different syntax
$a != $b Not equal TRUE if $a is not equal to $b after type juggling.
$a <> $b Not equal TRUE if $a is not equal to $b after type juggling.
Source: PHP Documentation