3v4l.org

run code in 300+ PHP versions simultaneously
<?php $spam_date = "Fri, 13 Sep 2019 20:27:47 +0200"; $expiryDate = new \DateTime($spam_date); $expiryDate->add(new DateInterval("P30D")); echo $expiryDate->format("c") . "\n";// ISO 8601 format //2019-10-13T20:27:47+02:00 echo $expiryDate->format("r") . "\n";//JS format //Sun, 13 Oct 2019 20:27:47 +0200 $now = new DateTime("now"); if ($expiryDate < $now){ echo "time is passed"; } else { echo "time is not passed"; } exit;
Output for git.master, git.master_jit, rfc.property-hooks
2019-10-13T20:27:47+02:00 Sun, 13 Oct 2019 20:27:47 +0200 time is not passed

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