- Output for 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
- 2024-11-01
- Output for 5.2.17
- 1970-01-01
<?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