3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function r($str) { $m=preg_match("+\/([^?]+).*",$str); echo $m[1]; } r("/kayak/es/husa-ciudad-de-compostela-60337.htm?checkin=2014-05-01&checkout=2014-05-02");
Output for 5.2.3 - 5.6.21, 7.0.0 - 7.1.0
Warning: preg_match(): Unknown modifier ')' in /in/jrIDW on line 3
Output for hhvm-3.10.0 - 3.12.0
Warning: Unknown modifier ')': [+\/([^?]+).*] in /in/jrIDW on line 3
Output for 4.4.3 - 5.2.2
<br /> <b>Warning</b>: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier ')' in <b>/in/jrIDW</b> on line <b>3</b><br />
Output for 4.3.11 - 4.4.2
<br /> <b>Warning</b>: preg_match(): Unknown modifier ')' in <b>/in/jrIDW</b> on line <b>3</b><br />
Output for 4.3.0 - 4.3.10
<br /> <b>Warning</b>: Unknown modifier ')' in <b>/in/jrIDW</b> on line <b>3</b><br />