3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'Ch #RoKamb93 ajesop de Bourg #kin #kinnl 9 kunsho taffetas,bunughs rges, note florale,parfaite aseref'; $delimiters = array('#kin', '#kinnl', '#xxx'); $split = preg_split('/' . implode($delimiters, '|') . '/', $string); var_dump($split);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(3) { [0]=> string(29) "Ch #RoKamb93 ajesop de Bourg " [1]=> string(1) " " [2]=> string(63) "nl 9 kunsho taffetas,bunughs rges, note florale,parfaite aseref" }