The difference when using if statement true === something() vs something() === true [duplicate]
PHP Snippet 1:
$foo = false;
if ($foo = true) ...
PHP Snippet 2:
$foo = false;
if (true = $foo) ...
$foo = false;
if ($foo = true) ...
$foo = false;
if (true = $foo) ...