diff --git a/language/control-structures/match.xml b/language/control-structures/match.xml index d2917bfad38f..ba29e5d61234 100644 --- a/language/control-structures/match.xml +++ b/language/control-structures/match.xml @@ -86,13 +86,38 @@ string(8) "Teenager" The result of a match expression does not need to be used. - - + A match expression must be - terminated by a semicolon ;. - - - + terminated by a semicolon ; in most scenarios. + There may be some exceptions where a semicolon is not required, such as + nested matches + + + 2} => match (true) {1 => 2} +}; +?> +]]> + + + + or operating with the result of the expression + + + + 2, + default => 0 +} + 3; +?> +]]> + + + The match expression is similar to a