Better yet, || and && shouldn't return boolean, but rather the last-evaluated operand:
PHP Code:
function foo(bar,baz) {
bar = bar || true;
baz = baz || "Hey, how're you doin'? ;)";
}
e: You saw nothing.
e2: Actually, if || and && are using the same optimization as
here, that would have to change for this to make any sense.
But perhaps we could just have ||= and &&=
PHP Code:
function foo(bar,baz) {
bar ||= true;
baz ||= "Hey, how're you doin'? ;)";
}