3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result_array = array(); $str = "1=>aaabba;4=>bsbsbsb;7=>flkdsl;5=>jdsfkjhsfd;"; $temp_array = explode(";",$str); $temp_array = array_filter($temp_array); foreach($temp_array as $val) { $sub_temp_array = explode("=>",$val); $result_array[$sub_temp_array[0]] = $sub_temp_array[1]; } print_r($result_array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [1] => aaabba [4] => bsbsbsb [7] => flkdsl [5] => jdsfkjhsfd )

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:
62.75 ms | 401 KiB | 8 Q