Question: I always include the following DTD on my web pages:

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

```

I want to start using PHP on one of my sites. Should I modify this DTD in any way in order for it to remain valid?

And is there any reason why I should **not** use PHP blocks before the DTD or should the DTD always be the very start of each file?

Answer: 
In brief
--------

The `DOCTYPE` has nothing to do with PHP, it is what is returned to the browser that you need to be aware of.

Detailed Answer
---------------

The `DOCTYPE` simply tells the browser how to interpret the page and the code that makes up the page. As `PHP` is a server side language, it has nothing to do with this, unless of course you are outputting specific HTML that requires a different `DOCTYPE` to the one you have defined.

Credit
------

@adeneo has rightly added that you should alter it, but not because it has anything to do with PHP. For HTML 5 you must declare the doctype using:

```
<!DOCTYPE html>

```
PHP outputs HTML (or other browser displayable content). As long as the HTML that is output complies with your doctype, you can continue to use the doctype you've chosen. If you're not aware of what a doctype is and does, here is an old but good reference: <http://www.alistapart.com/articles/doctype/>