Bug #72116 [NEW]: 7.0.6 array_fill optimization breaks implementation

From: Date: Thu, 28 Apr 2016 08:16:42 +0000
Subject: Bug #72116 [NEW]: 7.0.6 array_fill optimization breaks implementation
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200800@lists.php.net to get a copy of this message
From: sjon at hortensius dot net Operating system: Archlinux PHP version: Next Minor Version Package: Arrays related Bug Type: Bug Bug description:7.0.6 array_fill optimization breaks implementation Description: ------------ The soon to be released 7.0.6 ( is already in distro's repos) will break array_fill, see https://3v4l.org/ji79d This is most likely caused by https://github.com/php/php-src/commit/b31240f995a742b363074e0079b1aef4e577a27e Test script: --------------- <?php $x = array_fill(0, 1, '..'); $x[] = 'a'; var_dump($x); Expected result: ---------------- array(2) { [0]=> string(2) ".." [1]=> string(1) "a" } Actual result: -------------- Warning: Cannot add element to the array as the next element is already occupied in /in/ji79d on line 4 array(1) { [0]=> string(2) ".." } -- Edit bug report at https://bugs.php.net/bug.php?id=72116&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72116&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72116&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72116&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72116&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72116&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72116&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72116&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72116&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72116&r=support Expected behavior: https://bugs.php.net/fix.php?id=72116&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72116&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72116&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72116&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72116&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72116&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72116&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72116&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72116&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72116&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72116&r=mysqlcfg

« previous php.bugs (#200800) next »