3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isUrl($text) { $regex = array(); $regex["url"] = '/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/i'; $mat = array(); echo $regex["url"]; preg_match_all($regex["url"], $text, $mat); var_dump($mat); if ($mat[0]) { echo $mat[0]; } } isUrl("来戳这里!http://aaa.bb.cc sdfsafsdhttp://aa.bb.com");
Output for git.master, git.master_jit, rfc.property-hooks
/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\w]*))?)/i Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 119 in /in/WRBWl on line 7 array(0) { } Warning: Undefined array key 0 in /in/WRBWl on line 9

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
31.13 ms | 402 KiB | 8 Q