- Output for 7.4.4, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
- Number of days in current month: 30 Number of days in February this year: 29
<?php
echo 'Number of days in current month: ' . date('t') . "\n";
echo 'Number of days in February this year: ' . date('t', strtotime(date('Y') . '-02-01'));