Den tir. 10. jul. 2018 kl. 21.08 skrev David Rodrigues <david.pro...@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 ka...@php.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php