3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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; } } var_dump($test); var_dump($ipString); echo implode(':', $test[0]) echo true; ?>
Output for 5.4.0 - 5.5.8
Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ';' in /in/Xlk5l on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in /in/Xlk5l on line 16
Process exited with code 255.