3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $Arrr = array(1, 2, 3, 4); $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); $A = count($Arrr) > 0 ? "µ".implode("µµ", $Arrr)."µ" : ""; print_r($A);
based on mcUQ8
Output for 4.3.0 - 7.1.0
µ1µµ2µµ3µµ4µArray ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) µ1µµ2µµ3µµ4µArray ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) µ1µµ2µµ3µµ4µ