Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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: