|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-12-04 15:49 UTC] derick@php.net
[2001-12-04 16:00 UTC] davidw at ensky dot com
[2002-02-13 16:30 UTC] jonas at delfs dot dk
[2002-02-13 17:02 UTC] torben@php.net
[2002-02-14 17:41 UTC] jonas at delfs dot dk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 17:00:02 2025 UTC |
On my system, in_array wrongly returns true when searching for zero in arrays that don't contain zero: Sample code: in_array(0, array('foobar')); -->TRUE If I add the third parameter, it returns the correct result: print in_array(0, array('foobar'), true); -->FALSE However, I'm pretty sure that 0 doesn't coerce to 'foobar' - I don't think PHP is that loosely-typed :)