Operator precedence tells that order should be: +, &, =
. But this code execution shows that order is: &, =, +
$b = 1;
$a = & $b + print('print executed');
if ($a == 1)
echo ' but one was not added and error was not raised';
Output print executed but one was not added and error was not raised
Why precedence is changed for this case?
P.S.
$a = new stdClass();
$c = &$a instanceof $a;
var_dump($c); // class stdClass#1 (0) {}
$b = $a instanceof $a;
var_dump($b); // bool(true)