|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-04-20 15:58 UTC] dtajchreber@php.net
[2011-04-20 16:00 UTC] dtajchreber@php.net
[2011-04-20 16:02 UTC] dtajchreber@php.net
[2011-04-20 16:03 UTC] dtajchreber@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: dtajchreber
[2011-04-20 16:03 UTC] dtajchreber@php.net
[2020-02-07 06:08 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 09 22:00:02 2026 UTC |
Description: ------------ Consider: $safeColors = array(1,2,3,4,5,6,7,8,9,0,'a','b','c','d','e','f'); var_dump(in_array('T', $safeColors)); People not paying attention would assume "false", however, because T is compared with integers, it seems to be cast to 0, therefore, outputting true. A "solution" would be a warning on the in_array page, as this isn't a problem with the function, just something that confuses users who aren't expecting it.