/** * Tests if the IP is a valid IP, allowing wildcards, except in the first octet. * Wildcards can only be used from right to left, ie. 1.1.*.* is allowed, but 1.1.*.1 is not. * * @param string $ip IP address * @return bool */ private function isValidIp($ip) { return IP::getIpsForRange($ip) !== false; }