elegant way to convert IP to octal
<p>I have been looking for an elegant way in php to convert an IP address into its octal representation without having to do each of the four digits separately. </p>

<p>for example, the IP: 1.2.3.4 would be 0001.0002.0003.0004</p>
