This question already has an answer here:
In Windows (WAMP) I have an index.php like this
<?xml version="1.0" encoding="utf-8"?>
<?php
// ...
?>
and it works as expected.
Now I've just configured a LAMP on Ubuntu and the same file (when invoked from a browser) gives me an error. Looking in error.log
I've found
PHP Parse error: syntax error, unexpected T_STRING in /var/www/test/index.php on line 1
If I remove first line everything works fine.
What's wrong? Why this works on Windows and not on Linux?
Could this be caused from a particular extension?
<?xml ... ?>
string from PHP code so I didn't have to worry about how short tags were set. – Crontab May 8 '12 at 20:45