Skip to content

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

Closed

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

Activity

  1. TimWolla commented on Jan 29, 2025

    @TimWolla
    MemberAuthor

    Spun out of #17601, after I got the (private) feedback, that this should be considered a bug.

  2. added a commit that references this issue on Jan 29, 2025
    ad26aba
  3. added a commit that references this issue on Jan 31, 2025
    f8b57ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions