In first case 'result' will be 'false' because && operator executes first and result will be assign to 'result'. Like this: $result = ("First" && false);

$result = "First" && false;
var_dump($result);
result will be 'First', because first executes $result = "First" and next execute AND operator. Like this: ($result = "First") && false;

$result = "First" AND false;
var_dump($result);
by Nika Kobaidze
2 years ago
PHP
operator priority
PHP official doc
0
Pro tip: use ```triple backticks around text``` to write in code fences