in reply to No warning when assiging to a variable

It's the same kind of typo error that is being caught with $foo = 2
it's not the same.
if ($foo = $bar)
is same as
$foo = $bar; if ($bar)
which makes some sense. while
if ($foo = 2)
is same as
$foo = 2 if (2)
which does not make much sense.