|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-02-22 12:37 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 18:00:01 2025 UTC |
Description: ------------ in_array() returns true if needle exists as key with int(0) as value, but should return false because needle doesn't exist as value. Reproduce code: --------------- <?php var_dump( in_array('a', array('a' => 1) ) ); var_dump( in_array('a', array('a' => 0) ) ); ?> Expected result: ---------------- bool(false) bool(false) Actual result: -------------- bool(false) bool(true)