In PHP, is there any difference between the != and <> operators?
In the manual, it states:
$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.
I guess there are no huge differences but I’m curious.
In the main Zend implementation there is not any difference. You can get it from the Flex description of the PHP language scanner:
Where
T_IS_NOT_EQUALis the generated token. So the Bison parser does not distinguish between<>and!=tokens and treats them equally: