3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url=""; if (preg_match('/^(?:(?:https?):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$'/i, $url)) { }
Output for 7.2.0
Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/9fs14 on line 3 Warning: A non-numeric value encountered in /in/9fs14 on line 3 Warning: A non-numeric value encountered in /in/9fs14 on line 3 Warning: Division by zero in /in/9fs14 on line 3 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/9fs14 on line 3
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant i - assumed 'i' in /in/9fs14 on line 3 Warning: A non-numeric value encountered in /in/9fs14 on line 3 Warning: A non-numeric value encountered in /in/9fs14 on line 3 Warning: Division by zero in /in/9fs14 on line 3 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/9fs14 on line 3
Output for 7.0.0 - 7.0.20
Notice: Use of undefined constant i - assumed 'i' in /in/9fs14 on line 3 Warning: Division by zero in /in/9fs14 on line 3 Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /in/9fs14 on line 3
Output for 5.3.21 - 5.6.28
Notice: Use of undefined constant i - assumed 'i' in /in/9fs14 on line 3 Warning: Division by zero in /in/9fs14 on line 3 Warning: preg_match(): Empty regular expression in /in/9fs14 on line 3