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;

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
154.59 ms | 2092 KiB | 10 Q