ParseError thrown

syntax error, unexpected ' if' (T_STRING)