isIPV4.php
Table of Contents
Functions
- isIPV4() : string
- Check if an arbitrary string is suitable for interpretation as an IPv4 address.
Functions
isIPV4()
Check if an arbitrary string is suitable for interpretation as an IPv4 address.
isIPV4(string $value) : string
This helper wraps the ArangoDB AQL function IS_IPV4(value) which checks
whether the given string is a valid IPv4 address in dotted decimal notation.
Example AQL usage:
IS_IPV4("127.0.0.1") // returns true
IS_IPV4("192.168.0.1") // returns true
IS_IPV4("256.0.0.1") // returns false (invalid octet)
IS_IPV4("not an ip") // returns false
Parameters
- $value : string
-
String expression to validate as IPv4 address.
Tags
Return values
string —The formatted AQL expression.