Mac equivalent of /etc/nsswitch.conf for PHP chroot
It turns out that on OSX the DNS lookup is done through the service mDNSResponder service which is running as a socket at /var/run/mDNSResponder.

It does not use /etc/nsswitch.conf or /etc/resolv.conf so there is no way of mapping those files into a chroot. Instead it's a better idea to use a localhost proxy.