src/SubnetCalculator.php
public function isIPAddressInSubnet($ip_address_string)
    {
        $ip_address = ip2long($ip_address_string);
        list($start_ip, $end_ip) = $this->getIPAddressRangeAsInts();

        return $ip_address >= $start_ip && $ip_address <= $end_ip
            ? true
            : false;
    }
public function isIPAddressInSubnet($ip_address_string)
    {
        $ip_address = ip2long($ip_address_string);
        list($start_ip, $end_ip) = $this->getIPAddressRangeAsInts();

        return $ip_address >= $start_ip && $ip_address <= $end_ip
            ? true
            : false;
    }
public function isIPAddressInSubnet ( $ ip_address_string ) { $ ip_address = ip2long ( $ ip_address_string ) ; list ( $ start_ip , $ end_ip ) = $ this -> getIPAddressRangeAsInts ( ) ; return $ ip_address >= $ start_ip && $ ip_address <= $ end_ip ? true : false ; }
Is the IP address in the subnet?

@param string $ip_address_string

@return bool
Is the IP address in the subnet?