3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isDateValid(DateTime $checkDate, DateTime $startDate, DateTime $endDate) { return ($checkDate > $startDate && $checkDate < $endDate) ? true : false; } $checkDate = new DateTime("2016-06-15"); $startDate = new DateTime("2016-06-10 12:00"); $endDate = new DateTime("2016-06-20 12:00"); $isDateValid = isDateValid($checkDate, $startDate, $endDate); if($isDateValid){ echo "Valid"; }else{ echo "Invalid"; }
Output for git.master, git.master_jit, rfc.property-hooks
Valid

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