3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Get yesterday's date $endDate = date('d/m/Y',(strtotime('-1 day'))); // Get one month earlier $startDate = date('1/m/Y',(strtotime('first day of previous month'))); echo $endDate; echo "/"; echo $startDate;

preferences:
39.27 ms | 402 KiB | 5 Q