3v4l.org

run code in 300+ PHP versions simultaneously
<?php //set timezone to UTC to disregard daylight savings ini_set('date.timezone', 'America/New_York'); $date1 = new \DateTime('2006-01-01T12:00:00'); $date2 = new \DateTime('2006-06-01T12:00:00'); $interval = new \DateInterval('PT1H'); $periods = new \DatePeriod($date1, $interval, $date2); $hours = iterator_count($periods); echo $hours . ' hours';
Output for git.master, git.master_jit, rfc.property-hooks
3623 hours

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