Skip to content

mktime error documentation #1734

Description

@anthonyeden

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions