Login +

Documentation

SLS_String::isIpV4

Since SillySmart 1.0.7

Description

Check if the given string is a valid IPV4
static bool isIpV4 ( string $string);

Parameters

  • string $string
    the string to test

Return

bool
true if the string match with an ipv4, else false

Exemples

  •  var_dump(SLS_String::isIpV4("192.168.0.1"));
     // will produce : true
  •  var_dump(SLS_String::isIpV4("192.168.0"));
     // will produce : false

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.