3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $A = "µPhysik I~1µ"; $Ar = explode("µµ", substr($A, 2, -2)); print_r($Ar); $A = count($Arrr) > 0 ? "µ".implode("µµ", $Arrr)."µ" : ""; print_r($A); $Ar = explode("µµ", substr($A, 2, -2)); print_r($Ar); print_r(explode("~", $Ar[0])); $A = count($Arrr) > 0 ? "µ".implode("µµ", $Arrr)."µ" : ""; print_r($A);
based on 391ns
Output for 5.0.4 - 7.1.0
Array ( [0] => Physik I~1 ) Notice: Undefined variable: Arrr in /in/T62eN on line 5 Array ( [0] => ) Array ( [0] => ) Notice: Undefined variable: Arrr in /in/T62eN on line 10
Output for 4.3.0 - 5.0.3
Array ( [0] => Physik I~1 ) Notice: Undefined variable: Arrr in /in/T62eN on line 5 Array ( [0] => ) Array ( [0] => ) Notice: Undefined variable: Arrr in /in/T62eN on line 10