Edit report at http://bugs.php.net/bug.php?id=12669&edit=1
ID: 12669 Updated by: [email protected] Reported by: btanner at home dot com Summary: Utterly Global Variables - What Zeev was talkin about -Status: Open +Status: Wont fix Type: Feature/Change Request -Package: Feature/Change Request +Package: Scripting Engine problem Operating System: All PHP Version: 4.0.6 Block user comment: N Private report: N New Comment: Yes, you have $GLOBALS. Previous Comments: ------------------------------------------------------------------------ [2003-01-30 06:02:01] nobs at tigress dot com Hope I got this idea right: What I want is a "super-static" variable available for a script at any time. In other words: a variable that is static on script-level and not on function level. Currently I am using a constant-named session without cookies, but of course this is kinda hacked workaround. ------------------------------------------------------------------------ [2002-04-28 20:22:03] roberto at berto dot net There are other requested that is duplicated from this one: #14712 ------------------------------------------------------------------------ [2001-08-08 21:16:46] btanner at home dot com "The new variables are auto-globals - they're available in all function contexts" - Zeev How hard would it be to allow a construct so that a developer could indicate that one or more variables was available in all scope. I have a big "Enviroment" class that does everything from data processing, security, access control, page rendering, etc, etc, etc. Its a huge pain to pass around a handle to my "$Env" variable all the time. If the access control list needs to check something about the user, or the page needs to know which template it should be rendering, I need to traverse my heirarchy via this handle. I'm tired of having references to it stored everywhere ;) Any chance of getting this? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=12669&edit=1
