title: What is the proper way to convert ip to integer in php?
body: <p>So I need to store IP addresses in database, but storing them as stings is not very efficient and not very convenient for my purpose.</p>
  
  <p>So... How can I convert ip into integer in php with as less processing as possible because it will be done millions of times a day.</p>
  
  <p>And of course how can I convert back from integet to ip?</p>
  
  <p>I know this can be googled and there's some easy solutions - but I'm asking for the <strong>fastest</strong> way, not just for "do X and you get Y" because it's actually pretty easy task.</p>