|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76162 type-hint broken with custom error handling function
Submitted: 2018-03-29 13:35 UTC Modified: 2018-03-29 13:46 UTC
From: joseaugustodearaujonascimento at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: Unknown/Other Function
PHP Version: 5.6.34 OS: Debian 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: joseaugustodearaujonascimento at gmail dot com
New email:
PHP Version: OS:


 [2018-03-29 13:35 UTC] joseaugustodearaujonascimento at gmail dot com
This bug only affects PHP versions 5.6.x.

Test script:
class Event {
    public function setTime(\DateTime $time) {
function set_event_time(\DateTime $time) {
function e_handler() {

$e = new Event();


Expected result:
Fatal error: Uncaught TypeError: Argument 1 passed to Event::setTime() must be an instance of DateTime, boolean given, called in %s on line %d and defined in %s:%d

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-29 13:46 UTC]
-Status: Open +Status: Wont fix -Package: PHP Language Specification +Package: Unknown/Other Function -Assigned To: +Assigned To: cmb
 [2018-03-29 13:46 UTC]
> This bug only affects PHP versions 5.6.x.

Active support for PHP 5.6 ended more than a year ago[1].

[1] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 16:01:32 2024 UTC