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.
Example :
<?php
$numberOne = 5
$numberTwo = 7;
echo $numberTwo;
?>
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.