Bug #78759 [NEW]: array_search in $GLOBALS

From: Date: Tue, 29 Oct 2019 21:58:13 +0000
Subject: Bug #78759 [NEW]: array_search in $GLOBALS
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223509@lists.php.net to get a copy of this message
From: moonlighterr at gmail dot com Operating system: any? PHP version: 7.4.0RC4 Package: *General Issues Bug Type: Bug Bug description:array_search in $GLOBALS Description: ------------ Seems array_search have some problems with $GLOBALS array. Direct index calling works fine, searching by value in array_search not, similar with 'true' third parameter. Test script: --------------- $a = 22; var_dump($GLOBALS["a"]); // int 22 var_dump(array_search(22, $GLOBALS)); // false var_dump(array_search(22, $GLOBALS, true)); // false Expected result: ---------------- $a = 22; var_dump($GLOBALS["a"]); // int 22 var_dump(array_search(22, $GLOBALS)); // string "a" var_dump(array_search(22, $GLOBALS, true)); // string "a" -- Edit bug report at https://bugs.php.net/bug.php?id=78759&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78759&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78759&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78759&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78759&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78759&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78759&r=support Expected behavior: https://bugs.php.net/fix.php?id=78759&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78759&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78759&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78759&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78759&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78759&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78759&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78759&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78759&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78759&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78759&r=mysqlcfg

« previous php.bugs (#223509) next »