PHP's unbalanced " handling is not very smart: https://phpsadness.com/sad/44 though the general problem of good errors on invalid syntax is hard.