3v4l.org

run code in 300+ PHP versions simultaneously
<?php function multiexplode ($delimiters,$string) { $ready = str_replace($delimiters, $delimiters[0], $string); $launch = explode($delimiters[0], $ready); return $launch; } $text = "När:Sent lördag kväll och natt till söndag\nVar:Främst norra Jämtland\nIntensitet:Väst ca 21 m/s\nKommentar:-"; $exploded = multiexplode(array("\n",":"), $text); $result = array_intersect_key($exploded, array_flip(range(1,count($exploded),2))); print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [1] => Sent lördag kväll och natt till söndag [3] => Främst norra Jämtland [5] => Väst ca 21 m/s [7] => - )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
55.93 ms | 401 KiB | 8 Q