3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cdate = new DateTime("+7 months"); $cdate->modify("-" . ($cdate->format('j')-1) . " days"); $expiry_date= $cdate->format('Y-m-d'); $expiry_date = strtotime($expiry_date);

preferences:
48.86 ms | 402 KiB | 5 Q