- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$currentDate = date('Y-m-d');
// 使用strtotime计算下个月一号
$nextMonthFirstDay = date('Y-m-d', strtotime('first day of next month', strtotime($currentDate)));
echo $nextMonthFirstDay; // 输出格式为 YYYY-MM-DD