Statements "usually" end with a semicolon. In particular, statements that are statement-groups end with the "}", and a closing "?>" is also enough to end a statement (and turn off parsing, of course).
Writing "};" is wrong and can lead to bugs because now there's one of those "empty" statements in there that could potentially mess with control flow.