Identifying a development and production server by http_host
Switching behaviour based on the Host header is not something I would recommend.  The environment should be a property of the server, rather than of the request.  Depending on your hosting situation (whether you have an IP-based virtual host or name-based virtual host, and the details of how your webserver is configured), you might even be able to hit code on the production server using a request with a forged (or missing) Host header.

I recommend that you identify the production environment by some other means — probably by some configuration file that exists on the production server.