3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startYear = 2010; $array = []; for ($x = $startYear; $x <= date('Y'); $x ++) { $date = DateTime::createFromFormat('Y-m-d\TH:i:s', $x . '-01-01T00:00:00'); $array[$x] = $date->format('Y-m-d\TH:i:s'); } var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
array(9) { [2010]=> string(19) "2010-01-01T00:00:00" [2011]=> string(19) "2011-01-01T00:00:00" [2012]=> string(19) "2012-01-01T00:00:00" [2013]=> string(19) "2013-01-01T00:00:00" [2014]=> string(19) "2014-01-01T00:00:00" [2015]=> string(19) "2015-01-01T00:00:00" [2016]=> string(19) "2016-01-01T00:00:00" [2017]=> string(19) "2017-01-01T00:00:00" [2018]=> string(19) "2018-01-01T00:00:00" }

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