Check for a server environment in PHP