Bug #69172 [Csd]: array_slice behaviour BC in PHP7
Edit report at https://bugs.php.net/bug.php?id=69172&edit=1
ID: 69172
Updated by: reeze@php.net
Reported by: hdtfonseca at gmail dot com
Summary: array_slice behaviour BC in PHP7
Status: Closed
Type: Bug
Package: Arrays related
PHP Version: master-Git-2015-03-03 (Git)
Assigned To: reeze
Block user comment: N
Private report: N
New Comment:
Yes, I think that fix's test is enough, they are the same root cause. we can't enumerate
all of the usage of that case ;-)
Previous Comments:
------------------------------------------------------------------------
[2015-03-04 01:12:53] hdtfonseca at gmail dot com
Thanks, I didn't notice that those were related. Shouldn't we add tests for those?
Are the actual/expected results of this both issues enough for a PR to be accepted?
------------------------------------------------------------------------
[2015-03-04 00:58:12] yohgaki@php.net
It seems it's fixed. I don't know which commit does, though.
[yohgaki@dev php-src]$ ./php-bin
<?php
$stack[] = 'wew';
$stack[] = 'wew';
$stack[] = 'wew';
$stack[] = 'wew';
$stack = array_slice($stack, 0, - 2);
$stack[] = 'wew';
print_r($stack);
Array
(
[0] => wew
[1] => wew
[2] => wew
)
------------------------------------------------------------------------
[2015-03-04 00:58:00] reeze@php.net
See bug #69166
------------------------------------------------------------------------
[2015-03-04 00:24:51] hdtfonseca at gmail dot com
Hi, I'm sorry, I couldn't find the commit in master, can you give me a hint?
------------------------------------------------------------------------
[2015-03-03 18:01:36] reeze@php.net
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
This has been fixed, please try lastest master.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=69172
--
Edit this bug report at https://bugs.php.net/bug.php?id=69172&edit=1
Thread (7 messages)