Bug #79216 [NEW]: in_array bug

From: Date: Mon, 03 Feb 2020 15:54:53 +0000
Subject: Bug #79216 [NEW]: in_array bug
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225333@lists.php.net to get a copy of this message
From: uugv_tl at 163 dot com Operating system: macos 10.15.3 PHP version: 7.2.27 Package: *General Issues Bug Type: Bug Bug description:in_array bug Description: ------------ $arr = array('b', 0); if(in_array('abc',$arr)) { echo 'ok'; } else { echo 'bad' } when above statement echo 'ok',shoud be echo 'bad' right? Test script: --------------- $arr = array('b', 0); if(in_array('abc',$arr)) { echo 'ok'; } else { echo 'bad' } shoud be echo 'bad',but echo 'ok' Expected result: ---------------- 'bad' Actual result: -------------- 'ok' -- Edit bug report at https://bugs.php.net/bug.php?id=79216&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79216&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79216&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79216&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79216&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79216&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79216&r=support Expected behavior: https://bugs.php.net/fix.php?id=79216&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79216&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79216&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79216&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79216&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79216&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79216&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79216&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79216&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79216&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79216&r=mysqlcfg

« previous php.bugs (#225333) next »