3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new \DateTime('first day of this month'); echo $date1->format('Y-m-d') . "\n"; $date1->setDate(2016, 1, 8); echo $date1->format('Y-m-d') . "\n"; $date2 = new \DateTime('first day of january'); echo $date2->format('Y-m-d') . "\n"; $date2->setDate(2016, 3, 8); echo $date2->format('Y-m-d') . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
2017-03-01 2016-01-08 2017-01-01 2016-03-08

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