|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2013-09-12 01:07 UTC] aharvey@php.net
[2018-02-04 21:58 UTC] cmb@php.net
-Package: *General Issues
+Package: Scripting Engine problem
[2018-02-04 21:58 UTC] cmb@php.net
[2018-02-05 12:14 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2018-02-05 12:14 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 18:00:01 2025 UTC |
Description: ------------ When you type hint with a name of a type PHP has, the error message is ambiguous and confusing. Test script: --------------- function foo(boolean $bar) { var_dump($bar); } foo(true); Expected result: ---------------- Catchable fatal error: Argument 1 passed to foo() must be an instance of the class boolean, non-class of type boolean given, called in /code/VhrCdK on line 11 and defined in /code/VhrCdK on line 3 This is just my first thoughts on how to make it less confusing. Other suggestions would be apperciated. Actual result: -------------- Catchable fatal error: Argument 1 passed to foo() must be an instance of boolean, boolean given, called in /code/VhrCdK on line 11 and defined in /code/VhrCdK on line 3