3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("2017-06-06 13:04:50", "2017-06-06 13:09:54", "2017-06-06 13:20:20", "2017-06-06 13:40:29", "2017-06-06 14:05:30", "2017-06-06 14:12:50", "2017-06-06 14:30:40", "2017-06-06 15:01:36", "2017-06-06 15:06:16"); Foreach($arr as $val){ $newarr[] = date("Y-m-d H", strtotime($val)); } Var_dump($newarr); Var_dump(array_count_values($newarr));
Output for git.master, git.master_jit, rfc.property-hooks
array(9) { [0]=> string(13) "2017-06-06 13" [1]=> string(13) "2017-06-06 13" [2]=> string(13) "2017-06-06 13" [3]=> string(13) "2017-06-06 13" [4]=> string(13) "2017-06-06 14" [5]=> string(13) "2017-06-06 14" [6]=> string(13) "2017-06-06 14" [7]=> string(13) "2017-06-06 15" [8]=> string(13) "2017-06-06 15" } array(3) { ["2017-06-06 13"]=> int(4) ["2017-06-06 14"]=> int(3) ["2017-06-06 15"]=> int(2) }

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:
181.16 ms | 406 KiB | 5 Q