On 10.07.2018 at 11:01, Rowan Collins wrote:

> While I've not seen it used much in PHP code, the "do this or die" idiom is
> common in Perl (which also has post-fix "if" and "unless" modifiers, so
> those are a different feature again).

It seems to me the “do this or die” idiom at least has been very common
in PHP.  There may still be some occurences in the manual proper, and
definitely there are occurences in user contributed notes.

> Finally, a note on the "xor" operator - your draft says that this is
> equivalent to "!=", but that is not the case, because both can operate on
> non-boolean values. Consider "1 != 2" (true) vs "1 xor 2" (false). I don't
> think I've ever had a use for logical xor in PHP code, but there isn't
> anything to confuse it with, so no reason to remove it.

“xor” is equivalent to ^ (sans the precedence).

-- 
Christoph M. Becker

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to