#45105 [Opn->Bgs]: Type Hinting cause Fatal error instead on NullPointorException

From: Date: Tue, 27 May 2008 09:54:05 +0000
Subject: #45105 [Opn->Bgs]: Type Hinting cause Fatal error instead on NullPointorException
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125295@lists.php.net to get a copy of this message
ID: 45105 Updated by: derick@php.net Reported By: kingoleg at mail dot ru -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 5.2.6 New Comment: There is no such thing as a NullPointer in PHP. Previous Comments: ------------------------------------------------------------------------ [2008-05-27 08:56:25] kingoleg at mail dot ru Description: ------------ In same cases type hinting cause Fatal Error. I think that in one case NullPoinor will be better. Reproduce code: --------------- function foo(stdClass $a) { } foo(null); Expected result: ---------------- Exception is thrown Actual result: -------------- Fatal error ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45105&edit=1

« previous php.bugs (#125295) next »