Re: Unifying logical operators

From: Date: Tue, 10 Jul 2018 19:11:53 +0000
Subject: Re: Unifying logical operators
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-102730@lists.php.net to get a copy of this message
Den tir. 10. jul. 2018 kl. 21.08 skrev David Rodrigues <david.proweb@gmail.com>: > > I think that "or" could be removed if PHP could supports inline conditionals like: > > die() if !$connected; > throw Exception() if fail(); > $x = $y if (z() && w()); > > Or "when": die() when !$connected; > > It seems more clear than $connected or die(). I in fact find that more unreadable as you first got to dig through the error handling before you actually get to the logic that triggered it. -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#102730) next »