Having characters before <?php
can cause "Cannot modify header information" errors and similar problems with Ajax requests.
Noncompliant code example
test<?php //Noncompliant
// ...
and
// Noncompliant; newline before opening tag
<?php
// ...
Compliant solution
<?php
// ...