Function __global->is_valid_ip
Definitions
sources/global.php
- Find whether an IP address is valid.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $ip | IP | No | No | required parameter | N/A | N/A | IP address to check |
| $allow_wildcards | boolean | No | No | False | N/A | N/A | Allow wildcards |
Returns
- Whether the IP address is valid
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether an IP address is valid.
*
* @param IP $ip IP address to check
* @param boolean $allow_wildcards Allow wildcards
* @return boolean Whether the IP address is valid
*/
function is_valid_ip(string $ip, bool $allow_wildcards = false) : bool
* Find whether an IP address is valid.
*
* @param IP $ip IP address to check
* @param boolean $allow_wildcards Allow wildcards
* @return boolean Whether the IP address is valid
*/
function is_valid_ip(string $ip, bool $allow_wildcards = false) : bool
sources/minikernel.php
- Find whether an IP address is valid.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $ip | IP | No | No | required parameter | N/A | N/A | IP address to check |
| $allow_wildcards | boolean | No | No | False | N/A | N/A | Allow wildcards |
Returns
- Whether the IP address is valid
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether an IP address is valid.
*
* @param IP $ip IP address to check
* @param boolean $allow_wildcards Allow wildcards
* @return boolean Whether the IP address is valid
*/
function is_valid_ip(string $ip, bool $allow_wildcards = false) : bool
* Find whether an IP address is valid.
*
* @param IP $ip IP address to check
* @param boolean $allow_wildcards Allow wildcards
* @return boolean Whether the IP address is valid
*/
function is_valid_ip(string $ip, bool $allow_wildcards = false) : bool

