Good job. And perhaps that's the culprit. Everybody assumed it was a plain syntax error, but I don't think it's possible. Rather, it seems me that:
if ($user <something else ... ) {
was written here
but we'll never know because
the browser mistook it for an HTML tag,
and the user probably copied page contents
instead of saving it.
};
if (user_was_working_at_facebook_in_2007())
possibly_confirm('?');
/* lots of missing code may follow... until */
if (who knows what > 0 && ...