3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $Arrr = array("Physik I~1"); $A = count($Arrr) > 0 ? "µ".implode("µµ", $Arrr)."µ" : ""; print_r($A); $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)); $A = count($Arrr) > 0 ? "µ".implode("µµ", $Arrr)."µ" : ""; print_r($A);
based on O44Cl
Output for 5.3.1 - 7.1.0
µPhysik I~1µArray ( [0] => Physik I~1 ) µPhysik I~1µArray ( [0] => Physik I~1 ) Warning: explode() expects parameter 2 to be string, array given in /in/uOImm on line 11 µPhysik I~1µ
Output for 4.3.0 - 5.3.0
µPhysik I~1µArray ( [0] => Physik I~1 ) µPhysik I~1µArray ( [0] => Physik I~1 ) Notice: Array to string conversion in /in/uOImm on line 11 Array ( [0] => Array ) µPhysik I~1µ