3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new \DateTime('now'); $currentMonth = $now->format('n'); echo $currentMonth; $today = date('Y-n-j'); $last1 = "2021-11-1"; if($today > strtotime($last1)) echo 'true';

preferences:
43.97 ms | 402 KiB | 5 Q