Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102702 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92834 invoked from network); 10 Jul 2018 11:09:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2018 11:09:27 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.22 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.22 mout.gmx.net Received: from [212.227.17.22] ([212.227.17.22:52531] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/52-15421-4E3944B5 for ; Tue, 10 Jul 2018 07:09:27 -0400 Received: from [192.168.2.101] ([79.222.41.233]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LobGI-1gJ2pn0jvO-00gYHR; Tue, 10 Jul 2018 13:09:21 +0200 To: Rowan Collins , Ryan Cc: PHP internals References: Message-ID: <00c2c7a0-432e-0e19-983d-eca6c7cadf2e@gmx.de> Date: Tue, 10 Jul 2018 13:09:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:vDWqa0naKEkplght+IG12Yo2Ydicfg1oCfXQIiKXDlhlrqIDweW 8FStvNIUlsj+kvru0hKZlH0HdSI30kn3zShPBZRb35ZJGsABqzYyZYQgMO6qM5bi3RGFD3D jMRjhc9dAMyNS13AvDfCbe+5veGUobdUTEyn44qgcSIa77df5lTc+hSIsUXpq9VtFayXPhK B4gdRMwvZJ//QfJvRS65A== X-UI-Out-Filterresults: notjunk:1;V01:K0:tMRsraKFGBM=:ZWmy0TyP0VfG+4kXUw2auF qVuq2F7XsM8c96W/WPW5Paqmq+HSp+IlOPcUpzwMCssOOUNMK05dSh3W6WqZk7ARcpvphBESf WkbKpaoYNyZ0ivh/V3RkKAUFWDeI4hwVCjhslmg0CAl9GYHvsQg/YplfG8aGaZqCle3QGIGfa ArJJp/URS0aGJ+s9426hOfkkKSw/SpywnRFgW2RiPipF070+PeJZvmhmT8XNhLnheGve52kX7 nJmFUaAJ7HlwVmL7utvsmffuqSbK3Su5QvAQ9K5l45FxTRqt32UF9PMUctW7Hpm0uXK65VGzN 74EdkeSHztdSR8Dj93KRkHkF6ylwE8SuLbgGumvVbrIYKfannO9Mpt9oEgqEekXyTMRt0IEpr n6pV1FKHSe0jKckC43lHPmmyXN8MQ8xeUIgDj/P43NgxIzNo2/Nl4mIUWXyaOl4AUuAd3HgS2 WPgfWbI8ngvlgkdIGc6NAbqAu/c2OiRhSI6GAaLv/2fMHwjIFsJlQZT+B5/RCT2inv7cd3Rem /eiN/nshc5bVg687pjLsw0fz7TW7xnYgEvlHtxN3aTVC74FZ4C8aKhG4UTJk72At/f1ZTYv3s LkIp3YrA3my2t8tpQe50lRZsKuczURPG1ZMDXKh7BPqgmisFySvH8VP1fW7HHvSxDVWDxzv8W 5z9X3LfdrWjzjonrFEqxQACVr0NlzWG4ixMR7JCPzRkr5VFZfBJx0LvzsezC0bMbb4ORulhLu 3e5gBGIakI5Uf5C9F7GmFQiOLagN1JkGP0wDcBD2c1zxtlJk1jKjFZVC4BvXcqry9DdCn5v0r bBmPPd8 Subject: Re: [PHP-DEV] Unifying logical operators From: cmbecker69@gmx.de ("Christoph M. Becker") 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