Course lesson

Use a match statement for advanced PHP data checks

A switch statement includes a few awkward caveats that don't exist in PHP 8's new match statement. In this lesson, we will learn how to use a match statement to execute when a condition matches a specific value.

Duration
3 min
Access
Included
Transcript
Retained from source evidence

A switch statement includes a few awkward caveats that don't exist in PHP 8's new match statement. In this lesson, we will learn how to use a match statement to execute when a condition matches a specific value.