|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-07 01:55 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2010-08-07 01:55 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 22:00:02 2025 UTC |
Description: ------------ Now we have no ways to controll type casting of Countable-objects to boolean type. We would like to work with the SPL-derivatives, as well as with the built- in types. Test script: --------------- <?php class myCountable implements Countable { function count() { return 0; } } var_dump((boolean) array()); var_dump((boolean) new myCountable()); Expected result: ---------------- bool(false) bool(false) Actual result: -------------- bool(false) bool(true)