Skip to content

Breaking Change: set_exception_handler no longer returns the exception handler within itself #13446

Description

@greg0ire

Description

The following code:

<?php
set_exception_handler(function ($e): void {
    var_dump(set_exception_handler('is_int'));
});
throw new \Exception;

Resulted in this output:

NULL

But I expected this output instead:

object(Closure)#1 (1) {
  ["parameter"]=>
  array(1) {
    ["$e"]=>
    string(10) "<required>"
  }
}

PHP Version

8.3.0 and up

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