|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-10-03 15:52 UTC] renzo dot disalvo at gmail dot com
[2014-10-03 17:18 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2014-10-03 17:18 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 14:00:01 2026 UTC |
Description: ------------ I'm trying to generate some values and after assign to the array, The strange think is when I print out the output is totally different. In the final array I can see duplicate, but the original assignment is unique. Test script: --------------- for ($i = 1; $i <= 10; $i++) { $question = $this->getRandomQuestion(); print_r($question->data['name']); // return Correct Name $arrQuestion[$i] = $question; print_r($arrQuestion[$i]->data['name']); //Return Correct name print_r("\n"); } print_r($arrQuestion[1]); //Return Different Value