-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Description
The following code:
<?php
// normal behavior January to July
....
$ts04 = mktime(00, 12, 00, 04, 1, 2024);
$ts05 = mktime(00, 12, 00, 05, 1, 2024);
$ts06 = mktime(00, 12, 00, 06, 1, 2024);
$ts07 = mktime(00, 12, 00, 07, 1, 2024);
// failing behavior in August and September
$ts08 = mktime(00, 12, 00, 08, 1, 2024);
$ts8 = mktime(00, 12, 00, 8, 1, 2024); // fixed
$ts09 = mktime(00, 12, 00, 09, 1, 2024);
$ts9 = mktime(00, 12, 00, 9, 1, 2024); // fixed
echo 'TNOW = '.date('d-m-Y H:i:s', $ts04)."<br>\n";
echo 'TNOW = '.date('d-m-Y H:i:s', $ts05)."<br>\n";
echo 'TNOW = '.date('d-m-Y H:i:s', $ts06)."<br>\n";
echo 'TNOW = '.date('d-m-Y H:i:s', $ts07)."<br>\n";
echo 'TNOW = '.date('d-m-Y H:i:s', $ts08)."<br>\n";
echo 'TNOW = '.date('d-m-Y H:i:s', $ts8)."<br>\n";
echo 'TNOW = '.date('d-m-Y H:i:s', $ts09)."<br>\n";
echo 'TNOW = '.date('d-m-Y H:i:s', $ts9)."<br>\n";
<?phpResulted in this output: (for $ts08 and $ts09)
Parse error: Invalid numeric literal in ...
while $ts8 and $ts9 work OK and also all $ts0x until.
But I expected this output instead:
Output for 8.2.0 - 8.2.28, 8.3.0 - 8.3.19, 8.4.1 - 8.4.5
TNOW = 01-04-2024 00:12:00
TNOW = 01-05-2024 00:12:00
TNOW = 01-06-2024 00:12:00
TNOW = 01-07-2024 00:12:00
TNOW = 01-08-2024 00:12:00
TNOW = 01-09-2024 00:12:00
Am I missing something?
PHP Version
PHP 8.2.0 - 8.2.28, 8.3.0 - 8.3.19, 8.4.1 - 8.4.5
Operating System
No response