protected function IPLongCompare($long1, $long2, $operator = '=')
    {
        $operators = preg_split('//', $operator);
        $diff   = bccomp($long1, $long2);

        foreach ($operators as $operator) {
            switch(true)
            {
                case ( ( $operator === '=' ) && ( $diff == 0 ) ):
                case ( ( $operator === '<' ) && ( $diff < 0 ) ):
                case ( ( $operator === '>' ) && ( $diff > 0 ) ):
                    return true;
            }
        }

        return false;
    }
protected function IPLongCompare($long1, $long2, $operator = '=')
    {
        $operators = preg_split('//', $operator);
        $diff   = bccomp($long1, $long2);

        foreach ($operators as $operator) {
            switch(true)
            {
                case ( ( $operator === '=' ) && ( $diff == 0 ) ):
                case ( ( $operator === '<' ) && ( $diff < 0 ) ):
                case ( ( $operator === '>' ) && ( $diff > 0 ) ):
                    return true;
            }
        }

        return false;
    }
protected function IPLongCompare ( $ long1 , $ long2 , $ operator = '=' ) { $ operators = preg_split ( '//' , $ operator ) ; $ diff = bccomp ( $ long1 , $ long2 ) ; foreach ( $ operators as $ operator ) { switch ( true ) { case ( ( $ operator === '=' ) && ( $ diff == 0 ) ) : case ( ( $ operator === '<' ) && ( $ diff < 0 ) ) : case ( ( $ operator === '>' ) && ( $ diff > 0 ) ) : return true ; } } return false ; }
Compare 2 IP Long

@param mixed  $long1    IP Long
@param mixed  $long2    IP Long
@param string $operator Operator

@return boolean
Compare 2 IP Long