|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-10-24 06:53 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
-Package: Compile Failure
+Package: Scripting Engine problem
[2016-10-24 06:53 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 11 13:00:01 2026 UTC |
Description: ------------ When arguments are type-hinted in function, PHP throw fatal error when type-hint is double and boolean. In case of boolean, if it changes to bool, It doesn't give any fatal error Test script: --------------- function test(array $a, string $b, int $c, float $d, double $e, boolean $f) { echo "ok"; } test(["1"], "string", 1, 1.2, (double)1.2, false); Expected result: ---------------- Simply print output as "ok" Actual result: -------------- PHP Fatal error: Uncaught TypeError: Argument 5 passed to test() must be an instance of double, float given PHP Fatal error: Uncaught TypeError: Argument 6 passed to test() must be an instance of boolean, boolean given