3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "// File : /okcontent/js/Oryx/Cookies.js"; $str2 = "// File : /okcontent/js/twitter.js"; $str3 = "// File : /okcontent/js/Oryx/pups/Cookies.js"; $m = array(); $m2 = array(); $m3 = array(); $regex = preg_match("#File : /okcontent/js/(?:[\w-\/])?(.*?)\.js", $str, $m); $regex = preg_match("#File : /okcontent/js/(?:[\w-\/])?(.*?)\.js", $str2, $m2); $regex = preg_match("#File : /okcontent/js/(?:[\w-\/])?(.*?)\.js#", $str3, $m3); var_dump($m); var_dump($m2); var_dump($m3);
Output for 4.3.11 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_match(): No ending delimiter '#' found in /in/fjkXN on line 10 Warning: preg_match(): No ending delimiter '#' found in /in/fjkXN on line 11 array(0) { } array(0) { } array(2) { [0]=> string(41) "File : /okcontent/js/Oryx/pups/Cookies.js" [1]=> string(16) "ryx/pups/Cookies" }
Output for hhvm-3.10.0 - 3.12.0
Warning: No ending delimiter '#' found: [#File : /okcontent/js/(?:[\w-\/])?(.*?)\.js] in /in/fjkXN on line 10 Warning: No ending delimiter '#' found: [#File : /okcontent/js/(?:[\w-\/])?(.*?)\.js] in /in/fjkXN on line 11 array(0) { } array(0) { } array(2) { [0]=> string(41) "File : /okcontent/js/Oryx/pups/Cookies.js" [1]=> string(16) "ryx/pups/Cookies" }
Output for 4.3.0 - 4.3.10
Warning: No ending delimiter '#' found in /in/fjkXN on line 10 Warning: No ending delimiter '#' found in /in/fjkXN on line 11 array(0) { } array(0) { } array(2) { [0]=> string(41) "File : /okcontent/js/Oryx/pups/Cookies.js" [1]=> string(16) "ryx/pups/Cookies" }