AFAIK is impossible. Interfaces are abstracted from PHP; you can just use them, not select them.
Edit: let me rephrase this. If you want to make a system / shell call (for example ifconfig -a) and analyze this output, then bind the socket to this specific address, you might be lucky ... but this is like iffy business.
source
share