3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $samp = "This is an . example text using & my / Regex expression"; $samp = preg_replace('/[^ \w]+/', "", $samp); $jk = explode(" ",$samp); $i = sizeof($jk); $j = 0; for($j=0;$j<$i-1;$j++) { echo $jk[$j]." ".$jk[$i+1]."\n"; }
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined offset: 13 in /in/UM5a0 on line 10 This Notice: Undefined offset: 13 in /in/UM5a0 on line 10 is Notice: Undefined offset: 13 in /in/UM5a0 on line 10 an Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Notice: Undefined offset: 13 in /in/UM5a0 on line 10 example Notice: Undefined offset: 13 in /in/UM5a0 on line 10 text Notice: Undefined offset: 13 in /in/UM5a0 on line 10 using Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Notice: Undefined offset: 13 in /in/UM5a0 on line 10 my Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Regex
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: 13 in /in/UM5a0 on line 10 This Notice: Undefined index: 13 in /in/UM5a0 on line 10 is Notice: Undefined index: 13 in /in/UM5a0 on line 10 an Notice: Undefined index: 13 in /in/UM5a0 on line 10 Notice: Undefined index: 13 in /in/UM5a0 on line 10 example Notice: Undefined index: 13 in /in/UM5a0 on line 10 text Notice: Undefined index: 13 in /in/UM5a0 on line 10 using Notice: Undefined index: 13 in /in/UM5a0 on line 10 Notice: Undefined index: 13 in /in/UM5a0 on line 10 my Notice: Undefined index: 13 in /in/UM5a0 on line 10 Notice: Undefined index: 13 in /in/UM5a0 on line 10 Regex
Output for 4.3.0 - 5.2.17
Notice: Undefined offset: 13 in /in/UM5a0 on line 10 This Notice: Undefined offset: 13 in /in/UM5a0 on line 10 is Notice: Undefined offset: 13 in /in/UM5a0 on line 10 an Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Notice: Undefined offset: 13 in /in/UM5a0 on line 10 example Notice: Undefined offset: 13 in /in/UM5a0 on line 10 text Notice: Undefined offset: 13 in /in/UM5a0 on line 10 using Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Notice: Undefined offset: 13 in /in/UM5a0 on line 10 my Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Notice: Undefined offset: 13 in /in/UM5a0 on line 10 Regex