Req #79390 [NEW]: reset(new \ArrayObject()) return (bool) false in php7.4

From: Date: Wed, 18 Mar 2020 07:04:14 +0000
Subject: Req #79390 [NEW]: reset(new \ArrayObject()) return (bool) false in php7.4
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226140@lists.php.net to get a copy of this message
From: zhongyunchang at yeah dot net Operating system: Any PHP version: 7.4.3 Package: *General Issues Bug Type: Feature/Change Request Bug description:reset(new \ArrayObject()) return (bool) false in php7.4 Description: ------------ --- From manual page: https://php.net/migration74 --- <?php $arrayObject = new \ArrayObject(); $arrayObject->append('test string'); echo reset($arrayObject); I geted "test string" in <=PHP7.3 but (bool) false in PHP7.4.x, not found any explain on official document. Test script: --------------- <?php $arrayObject = new \ArrayObject(); $arrayObject->append('test string'); echo reset($arrayObject); Expected result: ---------------- "test string" Actual result: -------------- bool "false" -- Edit bug report at https://bugs.php.net/bug.php?id=79390&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79390&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79390&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79390&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79390&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79390&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79390&r=support Expected behavior: https://bugs.php.net/fix.php?id=79390&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79390&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79390&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79390&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79390&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79390&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79390&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79390&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79390&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79390&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79390&r=mysqlcfg

« previous php.bugs (#226140) next »