3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text="Fatti&Storie 5 - Lorem ipsum dolor [sit] amet [nid:3]";   $re1='.*?'; # Non-greedy match on filler   $re2='(\\[)'; # Any Single Character 1   $re3='(n)'; # Any Single Character 2   $re4='(i)'; # Any Single Character 3   $re5='(d)'; # Any Single Character 4   $re6='(:)'; # Any Single Character 5   if ($c=preg_match_all ("/".$re1.$re2.$re3.$re4.$re5.$re6."/is", $text, $matches))   {       $c1=$matches[1][0];       $c2=$matches[2][0];       $c3=$matches[3][0];       $c4=$matches[4][0];       $c5=$matches[5][0];       print "($c1) ($c2) ($c3) ($c4) ($c5) \n";   }
based on nOT7k
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected '$re1' (T_VARIABLE) in /in/dvI0p on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE in /in/dvI0p on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_VARIABLE in /in/dvI0p on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/dvI0p on line 6
Process exited with code 255.