Unmatched ‘}’¶
Description¶
PHP has encountered a closing curly brackets, but has no related opening curly bracket.
In more complex situations, there might be opening and closing brackets: this error reports that there are more closing ones than opening. Eventually, some will not have a matching bracket.
Inside double-quoted strings, the unmatched closing brackets are ignored, and used as literal value.
Example¶
<?php
$a = 1 + 2}
// 3 opening, 4 closing.
{{{$b = 1 + 2}}}}
// this unmatched closing bracket is taken as literal
$b = "$a} = 1+2";
?>
Solutions¶
Remove the closing curly bracket.
Add an opening closing curly bracket.