php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9176 Feature request: Sessions & reference variables
Submitted: 2001-02-08 13:35 UTC Modified: 2001-02-20 13:54 UTC
From: mccleary at efn dot org Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.3pl1 OS: Linux 2.2.17
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mccleary at efn dot org
New email:
PHP Version: OS:

 

 [2001-02-08 13:35 UTC] mccleary at efn dot org
Not a bug report but a feature request (the link sent me here...)

It'd be nice if session variables that are references stayed references throughout a session.  Ex:

page1.php:
session_start();
session_register("a"); session_register("b");
$a = 4;
$b = &$a;
print "a = $a, b = $b";

page2.php
$a = 7;
print "a = $a, b = $b";

-----
In page1 it works as expected, but in page2 $b is no longer a reference to $a, they both just have the same value at the beginning of the script.

It's be nice if $b stayed a reference to $a throughout the session.  Don't know how plausible that is though.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-20 13:54 UTC] sas@php.net
This has been implemented by Stas in 4.0.4.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 18:01:30 2024 UTC