Programming Languages
PHP
Objective
Sep 23, 2025
What does the match expression return when no condition matches and no default is provided?
Detailed Explanation
Explanation: PHP 8.0 introduced match expressions. Unlike switch statements, match is exhaustive - if no condition matches and no default case is provided, it throws an UnhandledMatchError exception.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts