php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20533 problem unsetting variables by deref
Submitted: 2002-11-20 23:42 UTC Modified: 2002-11-21 00:42 UTC
From: sputnik at reflexx dot net Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.3 OS: FreeBSD 4.6
Private report: No CVE-ID: None
 [2002-11-20 23:42 UTC] sputnik at reflexx dot net
pKillVar is defined as a global elsewhere in the script.
Its value is "pendingScope".


global $pKillVar;
$delete_me = $pKillVar;
global $$delete_me;
unset($$delete_me);

does NOT work. however:

$delete_me = "somevar";
global $$delete_me;
unset($$delete_me);

does. Seems to be a problem unsetting variables in the global scope. Have been having numerous problems related to such.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-21 00:42 UTC] derick@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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC