3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ipString = 'ffff:heee:dddd:cccc:bbbb:aaaa:9999:8888'; $test = array(); preg_match_all("/(?U:[a-f0-9]+:?)+/", $ipString, $test); if(count($test) > 1 || count($test[0]) > 8){ echo false; }else{ if(implode(':', $test[0]) !== $ipString){ echo false; } } echo true; ?>

preferences:
41.47 ms | 402 KiB | 5 Q