Re:Modern PHP features explained – PHP 8.0 and 8.1
by jw1224 on Thursday October 27, 2022 @01:34PM
(#33361060)
I use `match` like this a lot now, often with PHP 8.1's enums[1]. It makes it easy to write clean dynamic accessors, without all the extra blocks required with multiple `if` branches:
[1] https://stitcher.io/blog/php-enums
[ Parent
| on HN ]
There are no comments on this comment yet.