Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.08 KB

Ip.md

File metadata and controls

44 lines (30 loc) · 1.08 KB

Do you like this library? Leave a ★ or run composer global require symfony/thanks && composer thanks to say thank you to all libraries you use in your current project, this included!

IP Simple Value Object

Represents an IP value.

Base Ip signature

// vendor/darsyn/ip/src/IP.php

/**
 * Constructor
 *
 * @access public
 * @param string $ip
 * @param integer $type
 * @throws \InvalidArgumentException
 * @throws \Darsyn\IP\InvalidIpAddressException
 */
public function __construct($ip)

How to use the object

See the working example: examples/Ip.php.

$value = '127.0.0.1';

$ip = new Ip($value);
dump($ip);

Other useful info

About CIDR: http://software77.net/cidr-101.html

Relevant alternatives

Do you like this library? Leave a ★ or run composer global require symfony/thanks && composer thanks to say thank you to all libraries you use in your current project, this included!