Bug #71837 [NEW]: Wrong arrays behaviour
| From: | young dot inbox at gmail dot com | Date: | Wed, 16 Mar 2016 14:25:56 +0000 |
| Subject: | Bug #71837 [NEW]: Wrong arrays behaviour | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-199862@lists.php.net to get a copy of this message | ||
From: young dot inbox at gmail dot com
Operating system: Linux
PHP version: 7.0.4
Package: *General Issues
Bug Type: Bug
Bug description:Wrong arrays behaviour
Description:
------------
Value 200 shouldn't appear on array $p
And it gives different results on php5/7
Test script:
---------------
<?php
$p = array(array());
array_push($p[0], array(100));
$c = array_merge($p, array());
$c[0][0] = 200;
print_r($p);
Expected result:
----------------
Array
(
[0] => Array
(
[0] => Array
(
[0] => 100
)
)
)
Actual result:
--------------
Array
(
[0] => Array
(
[0] => 200
)
)
--
Edit bug report at https://bugs.php.net/bug.php?id=71837&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71837&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71837&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71837&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71837&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71837&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71837&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71837&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71837&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71837&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71837&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71837&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71837&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71837&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71837&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71837&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71837&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71837&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71837&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71837&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71837&r=mysqlcfg