<script></script> or <script />?

The script tag is required to have a closing tag, even if it uses the src attribute. Avoiding it causes undesired behaviours.


The script tag needs a separate closing tag to be valid code. See http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.1

Some browsers will accept the self closing tag, others wont, and the HTML version that you are using also affects the result. There are not self closing tags unless you use XHTML.

Passing the file through the PHP engine should not change the result, but it's possible that it makes an attempt to correct the incorrect script tags. You should view the source in the browser to see if the tags has been changed.