title: PHP how to check if IP RANGE provided is IPv4 or IPv6
body: <p>So I have the following two IP ranges</p>
  
  <pre><code>2a02:c78::/29
  2.120.0.0/13
  </code></pre>
  
  <p>What php function can i use to tell the difference between a ipv4 range and a ipv6 range</p>
  
  <p>Need something like this</p>
  
  <pre><code>function ip_range_type($range_ip)
  {
  //if ip range provided is ipv4 then
  
  //if ip range provided is ipv6 then
  }
  </code></pre>