Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12870407
IP.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
486 B
Referenced Files
None
Subscribers
None
IP.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Keruald\OmniTools\Network
;
class
IP
{
public
static
function
isIP
(
string
$ip
)
:
bool
{
return
self
::
isIPv4
(
$ip
)
||
self
::
isIPv6
(
$ip
);
}
public
static
function
isIPv4
(
string
$ip
)
:
bool
{
return
filter_var
(
$ip
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV4
)
!==
false
;
}
public
static
function
isIPv6
(
string
$ip
)
:
bool
{
return
filter_var
(
$ip
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV6
)
!==
false
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 17, 15:48 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3153568
Default Alt Text
IP.php (486 B)
Attached To
Mode
rKOT Keruald OmniTools
Attached
Detach File
Event Timeline
Log In to Comment