3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $oldstr1='<span style="font-family: Times New Roman; font-size: 12pt;">'; $oldstr2='</span>'; $newstr1='<input type="radio" value="1" name="choice">'; $newstr2="</input>"; $str=$values[$i] ['value']; while (preg_match($oldstr1, $str) && preg_match($oldstr2, $str)) { $str = preg_replace($oldstr1,$newstr1, $str, 1); $str = preg_replace($oldstr2,$newstr2, $str, 1); } echo $str;
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: values in /in/mpA8D on line 6 Notice: Undefined variable: i in /in/mpA8D on line 6
Output for hhvm-3.12.0
Notice: Undefined variable: values in /in/mpA8D on line 6
Output for hhvm-3.10.0
Notice: Undefined variable: values in /in/mpA8D on line 8
Output for 5.0.4 - 5.3.29
Notice: Undefined variable: i in /in/mpA8D on line 6 Notice: Undefined variable: values in /in/mpA8D on line 6
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/mpA8D on line 6 Notice: Undefined variable: values in /in/mpA8D on line 6