3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $strings = "Football / Germany / 1.Liga Football / Germany / 1.Liga Football / Germany / 2.Liga Football / Germany / 2.Liga Football / Germany / 2.Liga Football / England / 1.Liga Football / England / 1.Liga Football / England / 2.Liga Football / England / 2.Liga Football / England / 3.Liga Hockey / Germany / 1.Liga Hockey / Germany / 1.Liga Hockey / Germany / 2.Liga Fechten / Meisterschaft Fechten / Meisterschaft Fechten / Weltmeister"; $array = explode("\n", $strings); var_dump($array);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(16) { [0]=> string(27) "Football / Germany / 1.Liga" [1]=> string(27) "Football / Germany / 1.Liga" [2]=> string(27) "Football / Germany / 2.Liga" [3]=> string(27) "Football / Germany / 2.Liga" [4]=> string(27) "Football / Germany / 2.Liga" [5]=> string(27) "Football / England / 1.Liga" [6]=> string(27) "Football / England / 1.Liga" [7]=> string(27) "Football / England / 2.Liga" [8]=> string(27) "Football / England / 2.Liga" [9]=> string(27) "Football / England / 3.Liga" [10]=> string(25) "Hockey / Germany / 1.Liga" [11]=> string(25) "Hockey / Germany / 1.Liga" [12]=> string(25) "Hockey / Germany / 2.Liga" [13]=> string(23) "Fechten / Meisterschaft" [14]=> string(23) "Fechten / Meisterschaft" [15]=> string(21) "Fechten / Weltmeister" }