3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "2014-10-10,2689,100.20,99.33,2613 2014-10-13,2628,101.10,99.98,2741 2014-10-14,2741,100.06,99.20,2658 2014-10-15,2741,100.06,99.20,2658"; $date = array_reduce(explode(' ', $string), function($carry, $item) { $carry[] = explode(',', $item)[0]; return $carry; }); var_dump($date);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [0]=> string(10) "2014-10-10" [1]=> string(10) "2014-10-13" [2]=> string(10) "2014-10-14" [3]=> string(10) "2014-10-15" }

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:
26.65 ms | 405 KiB | 5 Q