You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code $foo = new \DateTime('@'.mktime(12)); generates error Instantiating DateTime with @ produces an error: Unexpected character for PHP 7.2-7.4. But this format is supported for unix timestamps: https://www.php.net/manual/en/datetime.formats.php (see table Localized Notations) and code works https://3v4l.org/Eo67a
Bug report
Code
$foo = new \DateTime('@'.mktime(12));
generates errorInstantiating DateTime with @ produces an error: Unexpected character
for PHP 7.2-7.4. But this format is supported for unix timestamps: https://www.php.net/manual/en/datetime.formats.php (see tableLocalized Notations
) and code works https://3v4l.org/Eo67aCode snippet that reproduces the problem
https://phpstan.org/r/dd0df9da-94ab-4b82-aba7-c936fd9dd724
Expected output
No errors
Did PHPStan help you today? Did it make you happy in any way?
It's quite early after midnight, so not yet today, sorry. But yesterday PHPStan saved me some time. Thanks!
The text was updated successfully, but these errors were encountered: