original_string: public function getIp6array($ip){
        // expand - example: "2600:3c00::" ->  "2600:3c00:0000:0000:0000:0000:0000:0000"
        $hex = unpack("H*hex", inet_pton($ip));         
        $ipStr = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex['hex']), 0, -1);
        
        $ipIntArray = array();
        $ipStrArray = explode(":", $ipStr);
        
        foreach ($ipStrArray as &$value) {
          $ipIntArray[] = hexdec($value);
        }
        
        return $ipIntArray;
      }
code: public function getIp6array($ip){
        // expand - example: "2600:3c00::" ->  "2600:3c00:0000:0000:0000:0000:0000:0000"
        $hex = unpack("H*hex", inet_pton($ip));         
        $ipStr = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex['hex']), 0, -1);
        
        $ipIntArray = array();
        $ipStrArray = explode(":", $ipStr);
        
        foreach ($ipStrArray as &$value) {
          $ipIntArray[] = hexdec($value);
        }
        
        return $ipIntArray;
      }
code_tokens: public function getIp6array ( $ ip ) { // expand - example: "2600:3c00::" ->  "2600:3c00:0000:0000:0000:0000:0000:0000" $ hex = unpack ( "H*hex" , inet_pton ( $ ip ) ) ; $ ipStr = substr ( preg_replace ( "/([A-f0-9]{4})/" , "$1:" , $ hex [ 'hex' ] ) , 0 , - 1 ) ; $ ipIntArray = array ( ) ; $ ipStrArray = explode ( ":" , $ ipStr ) ; foreach ( $ ipStrArray as & $ value ) { $ ipIntArray [ ] = hexdec ( $ value ) ; } return $ ipIntArray ; }
docstring: Ipv6 to array
  
  @param string $ip
  @return array
docstring_tokens: Ipv6 to array