PHP 8 Basics — The Match Expression

As of PHP8.0 a new expression was introduced, it is a powerful feature and it will often be the better choice compared to using switch.

(PHP 8) The expression branches evaluation based on an identity check of a value. Similarly to a statement, a expression has a subject expression that is compared against multiple alternatives. Unlike , it will evaluate to a value much like…



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Coman Cosmin

I convert real world problem into technical solutions. I do research and make robots.