4 ms·
Actually || is short circuiting and behaves exactly as he described, it returns the first true thing it encounters. $ php -a Interactive shell php > e
by claar 10y ago
Actually || is short circuiting and behaves exactly as he described, it returns the first true thing it encounters.
$ php -a
Interactive shell
php > echo 1 || die('die');
1
This echo's 1, it doesn't die.