3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $txt = "123~456!!!789~012!!!345~678!!!901~234!!!567~890!!!1234~5678"; $array = preg_split ('/!!!|~/', $txt); print_r($array);
Output for 4.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 123 [1] => 456 [2] => 789 [3] => 012 [4] => 345 [5] => 678 [6] => 901 [7] => 234 [8] => 567 [9] => 890 [10] => 1234 [11] => 5678 )