3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 'http://eoc.io' if (!preg_match('~^https?\:\/\/(?:[a-z\_\-0-9]|\.)+\.[a-z0-9]+(\/?)~i', $url, $matched)) { }else if($matched && $matched[1] === ''){ $url .= '/'; } var_dump($url);
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'if' (T_IF) in /in/tLQ9I on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_IF in /in/tLQ9I on line 4
Process exited with code 255.