I know about type juggling in PHP, but I don't quite understand this logic. I'd expect 'foo2bar' as output, but the below one gives '1bar' as output.
<?php
$x = 1;
echo 'foo' . $x + 1 . 'bar'; // echoes '1bar'
?>
Where does the 'foo'
go? Can someone explain this?