Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nicoburns
on Nov 26, 2020
|
parent
|
context
|
favorite
| on:
PHP 8
It's a switch statement that's an
expression
. That's a nice ergonomic improvement when you want to assign the result to a variable. Especially as it allows you to use a non-mutable variable whereas otherwise you'd have to make it mutable.
chmod775
on Nov 26, 2020
[–]
I wouldn't compare it to a switch statement, because a switch statement - even though it looks similar - has fundamentally different control flow.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: