Arm¶
An arm is a branch in a match() expression. There is the default
arm, and the other arm
. The arm includes the case (left) and the payload (right).
<?php
// a match with 2 arm, including the default
$a = match($b) {
1 => 2,
default => 3,
};
?>
Related : If Then Else, Branch, Match