note 129243 added to reflectionparameter.allowsnull

From: Date: Wed, 14 Feb 2024 09:55:59 +0000
Subject: note 129243 added to reflectionparameter.allowsnull
Groups: php.notes 
Request: Send a blank email to php-notes+get-221197@lists.php.net to get a copy of this message
Please note that mixed type parameter also returns true, as null is part of the mixed union. And there does not have to be a default null value for ->allowsNull() to return true. function test (AnyType|null $param1, mixed $param2) {} Both parameters from the function above will return true for allowsNull(). ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.13.131 (proxied: 216.73.162.59) ---- Manual Page -- https://php.net/manual/en/reflectionparameter.allowsnull.php Edit -- https://main.php.net/note/edit/129243 Del: integrated -- https://main.php.net/note/delete/129243/integrated Del: useless -- https://main.php.net/note/delete/129243/useless Del: bad code -- https://main.php.net/note/delete/129243/bad+code Del: spam -- https://main.php.net/note/delete/129243/spam Del: non-english -- https://main.php.net/note/delete/129243/non-english Del: in docs -- https://main.php.net/note/delete/129243/in+docs Del: other reasons-- https://main.php.net/note/delete/129243 Reject -- https://main.php.net/note/reject/129243 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221197) next »