3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new DateTime('2014-07-01 10:00:00'); $date2= new DateTime('2014-07-01 18:00:00'); $interval=$date2->diff($date1); echo "Years: {$interval->y }\n"; echo "Months: {$interval->m }\n"; echo "Days: {$interval->d }\n"; echo "Hours: {$interval->h }\n"; echo "Mins: {$interval->i }\n"; echo "Secs: {$interval->s }\n"; echo $interval->format("%Y years, %m months, %d days, %H hours, %i minutes, %s seconds") . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
Years: 0 Months: 0 Days: 0 Hours: 8 Mins: 0 Secs: 0 00 years, 0 months, 0 days, 08 hours, 0 minutes, 0 seconds

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