Bug #72116 [Opn->Csd]: 7.0.6 array_fill optimization breaks implementation
| From: | bwoebi@php.net | Date: | Thu, 28 Apr 2016 09:03:02 +0000 |
| Subject: | Bug #72116 [Opn->Csd]: 7.0.6 array_fill optimization breaks implementation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200801@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72116&edit=1
ID: 72116
Updated by: bwoebi@php.net
Reported by: sjon at hortensius dot net
Summary: 7.0.6 array_fill optimization breaks implementation
-Status: Open
+Status: Closed
Type: Bug
Package: Arrays related
Operating System: Archlinux
PHP Version: Next Minor Version
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=74ef863f5d83c8ab7377eb7ca27a6ffc4b7502ae
Log: Fixed bug #72116 (7.0.6 array_fill optimization breaks implementation)
Previous Comments:
------------------------------------------------------------------------
[2016-04-28 08:16:36] sjon at hortensius dot net
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 this bug report at https://bugs.php.net/bug.php?id=72116&edit=1