From manual page: https://php.net/function.mktime
In a similar vein to #1558, the mtkime docs states "If the arguments are invalid, the function returns false." Under "Errors/Exceptions" it says "Every call to a date/time function will generate a E_WARNING if the time zone is not valid"
However, in PHP 8 it throws a E_ERROR / TypeError if you supply invalid parameters.
I know invalid params in PHP 8 throw TypeErrors and ValueErrors, but I think the docs need a big re-think if it's okay for pages to state certain error conditions but not all of them. PHP docs used to be quite helpful in showing all fatal error states, but since the move to PHP 8 they haven't really kept up.
From manual page: https://php.net/function.mktime
In a similar vein to #1558, the
mtkimedocs states "If the arguments are invalid, the function returns false." Under "Errors/Exceptions" it says "Every call to a date/time function will generate a E_WARNING if the time zone is not valid"However, in PHP 8 it throws a E_ERROR / TypeError if you supply invalid parameters.
I know invalid params in PHP 8 throw TypeErrors and ValueErrors, but I think the docs need a big re-think if it's okay for pages to state certain error conditions but not all of them. PHP docs used to be quite helpful in showing all fatal error states, but since the move to PHP 8 they haven't really kept up.