3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sometext = "Some text **that is bold!** and some other text" $string = explode('**', $str); $newStr = ''; for ($i = 0; $i < count($string); ++$i) { if ($i % 2 == 0 || $i == 0) $newStr .= $newStr[$i]."<b>"; else $newStr .= $newStr[$i]."</b>" ; } echo $newStr;
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '$string' (T_VARIABLE) in /in/tZTWm on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/tZTWm on line 4
Process exited with code 255.