Re: Unifying logical operators

From: Date: Tue, 10 Jul 2018 19:38:36 +0000
Subject: Re: Unifying logical operators
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-102733@lists.php.net to get a copy of this message
On Mon, Jul 9, 2018 at 10:03 PM Ryan <iggyvolz@gmail.com> wrote: > Hello all! Longtime PHP user, first-time contributor to internals (sorry > if I screw anything up)! > > I'd like to propose either the deprecation (7.next - likely 7.4 at this > point) and removal (8.0) of the T_LOGICAL_OR (or), T_LOGICAL_AND (and), and > T_LOGICAL_XOR (xor) tokens, or aliasing them to ||, &&, and != > respectively. > While having these behave they do is unfortunate, it is hardly the only one of PHP's quirks. Ever looked at the ramifications of loose typing with comparison? http://phpsadness.com/sad/52 > defined("SOME_CONSTANT") or die("SOME_CONSTANT was not defined"); > > However, this behaviour has nothing to do with the difference of precedence > - rather this is due to short circuiting. True, but that's still a lot of code to break. A *lot* of code. Far too much to consider changing this even at a major level I would think. PHP if anything, is too pragmatic a language for this change.

« previous php.internals (#102733) next »