3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(0=>"Premier: 3/svart/XL ID:35235", 1=>"Premier: 3/vit/S ID:9999"); foreach ($a as $b) { $list_premier = explode('ID',$b); $premier = trim(substr($list_premier[0],10)); $premier = str_replace( array(' ', '1' , '2', '3'), array(' + ', 'tygvƤska', 'chocklad', 't-shirt'), $premier ) ; echo $premier . "<br>"; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
/svart/XL<br>/vit/S<br>