Bug #71837 [Opn->Csd]: Wrong arrays behaviour

From: Date: Thu, 17 Mar 2016 14:51:51 +0000
Subject: Bug #71837 [Opn->Csd]: Wrong arrays behaviour
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199893@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71837&edit=1 ID: 71837 Updated by: laruence@php.net Reported by: young dot inbox at gmail dot com Summary: Wrong arrays behaviour -Status: Open +Status: Closed Type: Bug Package: *General Issues Operating System: Linux PHP Version: 7.0.4 Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=345ecd9822820a54134bd53a6e449e1f22612e19 Log: Fixed #71837 (Wrong arrays behaviour) Previous Comments: ------------------------------------------------------------------------ [2016-03-16 14:25:53] young dot inbox at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=71837&edit=1

« previous php.bugs (#199893) next »