method isIp documentation in bbn\Str

Checks if the argument is a valid ip address.

Example

X::dump(\bbn\Str::isIp('198.162.0.1')); // (bool) true X::dump(\bbn\Str::isIp('29e4:4068:a401:f273:dcec:af8f:c8b3:c01c')); // (bool) true X::dump(\bbn\Str::isIp('198.162')); // (bool) false function($st) { return (bool)filter_var($st, FILTER_VALIDATE_IP); }

Checks if the argument is a valid ip address. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.