php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39225 $_SESSION getting confused with regular variables
Submitted: 2006-10-21 21:49 UTC Modified: 2006-10-21 21:54 UTC
From: dgk at visskiss dot org Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.1.6 OS: fedora
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dgk at visskiss dot org
New email:
PHP Version: OS:

 

 [2006-10-21 21:49 UTC] dgk at visskiss dot org
Description:
------------
$_SESSION variables are being confused/parsed as regular 
variables or vice versa

Reproduce code:
---------------
$_SESSION['uid']=99;
echo $_SESSION['uid'];
$uid = '55';
echo $_SESSION['uid'];

Expected result:
----------------
9999

Actual result:
--------------
9955

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-21 21:54 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is the way register_globals works and this is expected behaviour.
Btw, register_globals is OFF by default since ages.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 18:01:32 2025 UTC