[PHP-DEV] RFC Throw expression was accepted

2020-04-19 Thread Ilija Tovilo
Hi internals I closed the votinng on the throw expression RFC. https://wiki.php.net/rfc/throw_expression It was accepted with 46 Yes and 3 No votes. Thanks to everybody who participated! Ilija -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/uns

[PHP-DEV] [RFC] throw expression

2020-03-19 Thread Ilija Tovilo
Hi everybody! Yesterday I stumbled upon this Tweet by Nikita: https://twitter.com/nikita_ppv/status/1240309838950866946 It answered why this seemingly correct block of code doesn't work:     fn() => throw new Exception('nope'); The answer is rather simple. `throw` is a statement, n