Re: Re: problem with super global '$_REQUEST'
| From: | Justin Patrin | Date: | Fri, 16 Jul 2004 15:45:53 +0000 |
| Subject: | Re: Re: problem with super global '$_REQUEST' | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190719@lists.php.net to get a copy of this message | ||
It does. ;-) I was just throwing out an interesting piece of code.
Honestly, I'm surprised that it doesn't segfault PHP. Good job, internals!
On Thu, 15 Jul 2004 21:02:10 -0700, Dennis Gearon <gearond@fireserve.net> wrote:
> I bet it would work, 'cause whenever $GLOBALS is 'print_r'd, Globals shows up
> and a 'recursion note' ends the execution of 'print_r'.
>
>
>
> Justin Patrin wrote:
>
> > You *can* unset it, you just have to unset the place where it really
> > sits. When you have a global in a function, then unset it, you only
> > disconnect the variable. unset doesn't destroy a variable, it just
> > breaks the reference.
> >
> > As I said in my earlier e-mail, using this *will* work (I tested it):
> >
> > unset($GLOBALS['_REQUEST']);
> >
> > $GLOBALS is itself a superglobal.....hmmm, wonder what would happen if
> > you unset($GLOBALS['GLOBALS'])....
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:40f75144237587900317931!
>
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--