Is there a good way to match an IPv6 address to an IPv6 subnet using CIDR notation? What I am looking for is the IPv6 equivalent to this: Matching an IP to a CIDR mask in PH
You can also use the IpUtils class from symfony/http-foundation package:
IpUtils::checkIp6('2a01:8760:2:3001::1', '2a01:8760:2:3001::1/64')
This will check the IPv6 validity and range match. Will return false if it's not the case.
false