Anonymous | Login | Signup for a new account | 12-17-2024 11:43 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ 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 | ||||||
Status | closed | Product Version | 3.1.4 | ||||||
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. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |