Lines Matching refs:ip
93 * @param string $ip The IPv4 or IPv6 address.
99 public static function ipToNumber(string $ip): array argument
101 $binary = inet_pton($ip);
104 throw new Exception('Invalid IP: ' . $ip);
135 * @param string $ip The address to test.
140 public static function ipMatches(string $ip, string $ipOrRange): bool argument
147 return Ip::ipToNumber($ip) === Ip::ipToNumber($ipOrRange);
150 return Ip::ipInRange($ip, $ipOrRange);
163 * @param string $ip The IP address of the proxy.
167 public static function proxyIsTrusted(string $ip): bool argument
177 if (Ip::ipMatches($ip, $trusted)) {
293 $ips = array_filter($ips, static fn($ip) => filter_var($ip, FILTER_VALIDATE_IP));