How to use βmatchβ with PHP 8 π―
`match` expression with PHP 8.0

I'm Pierre-Henry Soria. A passionate full stack engineer, building things that matter, making a real impact on the world.
Really like to take care of others and manage my workflow based on productivity methodologies.
Open to fast-paced changes with rapidly evolving business and technologies. I'm always thirsty to learn and undertake new exciting things and thrilling challenges.
Let's use match expression with PHP 8.0 πͺ Lets' see when to use it and why it can have advantages over the old good switch statement.match will indeed make your code cleaner, less verbose, and easier to read π₯
Furthermore, with the βhttps://php.watch/versions/8.0/match-expressionβ expression, you can have multiple matching conditions separated by commas, like
$sMessage = match ($sDayPrefix) {
'Sat', 'Sun' => 'Enjoy your weekend!',
};
π« Side Projects on GitHub π https://github.com/pH-7




