RFC: Allow throwing an exception as right part of null coalescing operator

From: Date: Mon, 24 Jul 2017 07:37:07 +0000
Subject: RFC: Allow throwing an exception as right part of null coalescing operator
Groups: php.internals 
Request: Send a blank email to internals+get-100024@lists.php.net to get a copy of this message
Dear internals, Don't you think allowing to throw an exception as the right side of null coalescing operator would be a good idea? Something like: echo $a ?? throw new \RuntimeException('foo'); Regards, Tim

« previous php.internals (#100024) next »