Function __global->compare_ip_address

Definitions

sources/global3.php

  • Compare two IP addresses for potential correlation. Not as simple as equality due to '*' syntax.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$wild string No No required parameter N/A N/A The general IP address that is potentially wildcarded
$full IP No No required parameter N/A N/A The specific IP address we are checking

Returns

  • Whether the IP addresses correlate
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Compare two IP addresses for potential correlation. Not as simple as equality due to '*' syntax.
 *
 * @param  string $wild The general IP address that is potentially wildcarded
 * @param  IP $full The specific IP address we are checking
 * @return boolean Whether the IP addresses correlate
 */

function compare_ip_address(string $wild, string $full) : bool