Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
francislavoie
on March 27, 2022
|
parent
|
context
|
favorite
| on:
Modern PHP
You can do the same in PHP, but again, not as nice to read:
['abc' => 2, 'def' => 3][$x] ?? 'default';
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
['abc' => 2, 'def' => 3][$x] ?? 'default';