This error comes when you forget to use a semi colon or correct use of " that is inverted commas or any programming mistakes generally syntax related.
$numberOne = 5
$numberTwo = 7;
This error will be at line three because of missing semi colon. In PHP parser it converts programs into series of PHP tokens. T_VARIABLE token is of type VARIABLE and when parser processes the tokens,it will throws this error if it receives a variable where none is allowed.