3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new DateTime('2000-01-01'); $date2= new DateTime('now'); $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: 14 Months: 5 Days: 18 Hours: 8 Mins: 17 Secs: 8 14 years, 5 months, 18 days, 08 hours, 17 minutes, 8 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:
39.74 ms | 401 KiB | 8 Q