Match expressions vs. Switch statements in PHP 8

Опубликовано: 08 Февраль 2022
на канале: Amit Merchant
128
5

PHP 8 introduces a new way of comparing things and executing a block of statements called "Match expressions". It's similar to the switch statement but with safer semantics and the ability to return values.

In this video, I'm going to talk about match expressions and their advantages over some other methods like if-else conditions and switch statements!

You can read the companion article on my blog: https://www.amitmerchant.com/match-ex...

Step up your game with PHP with my book: https://amitmerchant.gumroad.com/l/ph...

You can follow me on Twitter:   / amit_merchant