Bug #78746 [NEW]: Inconsistent behavior of reset()

From: Date: Thu, 24 Oct 2019 04:35:57 +0000
Subject: Bug #78746 [NEW]: Inconsistent behavior of reset()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223447@lists.php.net to get a copy of this message
From: kolesnikov at farpost dot com Operating system: Linux PHP version: 7.4.0RC4 Package: Arrays related Bug Type: Bug Bug description:Inconsistent behavior of reset() Description: ------------ Function reset() returns false when using on Iterator or ArrayObject on PHP 7.4.0RC4, but returns value of first element of array on PHP 7.3.10 and below. Test script: --------------- <?php $iterator = new ArrayIterator([1, 2, 3]); var_dump(reset($iterator)); Expected result: ---------------- int(1) Actual result: -------------- bool(false) -- Edit bug report at https://bugs.php.net/bug.php?id=78746&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78746&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78746&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78746&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78746&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78746&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78746&r=support Expected behavior: https://bugs.php.net/fix.php?id=78746&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78746&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78746&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78746&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78746&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78746&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78746&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78746&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78746&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78746&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78746&r=mysqlcfg

« previous php.bugs (#223447) next »