Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002259 [Quercus] minor always 12-15-07 13:30 05-12-08 16:47
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.0 Product Version 3.1.4
  Product Build
Summary 0002259: Can't unset a global from inside a function
Description <?php
$TESTVAR = 'abc';

function rm1() {
        unset($GLOBALS['TESTVAR']);
}

function rm2() {
        global $TESTVAR;
        unset($TESTVAR);
}

rm1();
print $TESTVAR . "\n";
rm2();
print $TESTVAR . "\n";
unset($TESTVAR);
print $TESTVAR . "\n";


Vanilla PHP prints three blank lines. Quercus (both interpreted and compiled mode) prints "abc" twice, then a blank line -- the unset() calls inside the functions aren't working, but the global-scope one is.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003054)
ferg
05-12-08 16:47

php/023b, php/323b
 

- Issue History
Date Modified Username Field Change
12-15-07 13:30 koreth New Issue
05-12-08 16:47 ferg Note Added: 0003054
05-12-08 16:47 ferg Assigned To  => ferg
05-12-08 16:47 ferg Status new => closed
05-12-08 16:47 ferg Resolution open => fixed
05-12-08 16:47 ferg Fixed in Version  => 3.2.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker