Work with MySQL Sockets

This passes anything that is not a valid port (0<int<65535) as a unix socket.
I tested this with unix sockets; this needs to be tested with a non-standard mysql port as well but I don't foresee any issues.

To use a unix socket, even one different than PHP's mysql.default_socket..
* Database Host = localhost:/path/to/socket
I'm using $socket because they are both sockets, one is the original file socket, and the other is the later invented 'network' socket (AKA port). It looks confusing but I don't think it is incorrect, and I believe it is more efficient then having two variables with the same value.

Do I have to rename it? It's not technically incorrect and I believe more efficient. Ultimately I'll go with what you say is best, I just wanted to give my reasoning.