Skip to content

UnhandledMatchError does not take zend.exception_ignore_args=1 into account #17618

@TimWolla

Description

@TimWolla

Description

The following code:

<?php

ini_set('zend.exception_ignore_args', '1');

try {
    match (1) { };
} catch (Error $e) { echo $e->getMessage(), PHP_EOL; }

try {
    match ("foo bar baz foo bar baz") { };
} catch (Error $e) { echo $e->getMessage(), PHP_EOL; }

https://3v4l.org/Xen86

Resulted in this output:

Unhandled match case 1
Unhandled match case 'foo bar baz foo...'

But I expected this output instead:

Unhandled match case of type int
Unhandled match case of type string

PHP Version

PHP 8.1.0 - PHP 8.4.3

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions