Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Block catch without variable #23

@i582

Description

@i582

RFC: https://wiki.php.net/rfc/non-capturing_catches

Example:

try {
    changeImportantData();
} catch (PermissionException) { // The intention is clear: exception details are irrelevant
    echo "You don't have permission to do this";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    PHP 8PHP 8 features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions