I am very new to PHP and am trying to modify an existing PHP file. Even when I only add an additional line and save the code, I receive an error on the website after uploading:
Parse error: syntax error, unexpected 'if' (T_IF) in /home/.../file.php on line 1
On line 1, the code starts with
<?php
When I only leave <?
at the beginning, I get this error:
Parse error: syntax error, unexpected (T_VARIABLE) on line 1
At the end, there should not be any error, as I am not changing any single line of code. When uploading the original file back on the server, the error disappears.
I am using XAMPP and PHPstorm with 7.3 interpreter.