|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-07 12:55 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jun 19 16:00:01 2026 UTC |
Description: ------------ PHP breaks OOB by not accepting null as a proper value for type_hinted argument. In every OO language i know i have the way to dereference non-primitive object to null. Without this, i have to make _very_ big mess in code to make such things work. Reproduce code: --------------- class Foo { } function x(Foo $a, Foo $x) { } $l = new Foo(); x(null, $l); Expected result: ---------------- normal work Actual result: -------------- Fatal error: Argument 1 must not be null in file.php in line 7