For the "unexpected token" issue, it might be encoding like you said. Save the file as UTF-8 without BOM. Also, check for invisible chars with a hex editor if you’re desperate.
Fun fact: Some editors add BOM headers silently, and PHP hates that.
Fun fact: Some editors add BOM headers silently, and PHP hates that.
