|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-27 22:47 UTC] judas dot iscariote at gmail dot com
[2006-04-28 00:43 UTC] bjori@php.net
[2006-04-28 07:18 UTC] mcsimm at inbox dot ru
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
Description: ------------ When keeping copyies of $_SESSION array its values are copied as references. Bug has found in version 4.4.2 (FreeBSD) In version 4.3.10 (Windows) this work correctly. Reproduce code: --------------- <?php session_start(); $test_array = array(); $_SESSION['var'] = 'first'; $copy1 = $_SESSION; $_SESSION['var'] = 'second'; $copy2 = $_SESSION; var_dump($copy1); var_dump($copy2); ?> Expected result: ---------------- array(1) { ["var"]=> string(5) "first" } array(1) { ["var"]=> string(6) "second" } Actual result: -------------- array(1) { ["var"]=> &string(6) "second" } array(1) { ["var"]=> &string(6) "second" }