| Anonymous | Login | Signup for a new account | 12-13-2025 06:10 PST |
| Main | My View | View Issues | Change Log | Docs |
| 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 | |||||||||
|
|
|||||||||
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |