Important note: You should avoid its use in production.
DNS Resolution may take from 0.5 to 4 seconds, and during this time your script is NOT being executed.
Your customers may think that the server is slow, but actually it is just waiting for the DNS resolution response.
You can use it, but if you want performance, you should avoid it, or schedule it to some CRON script...