Re: [PHP4BETA] Is autoregister of HTTP_STATE_VARS possible?

From: Date: Thu, 27 Apr 2000 15:28:07 +0000
Subject: Re: [PHP4BETA] Is autoregister of HTTP_STATE_VARS possible?
References: 1 2 3 4 5 6 7  Groups: php.version4 
Request: Send a blank email to php-version4+get-14074@lists.php.net to get a copy of this message
Hi, Hmm, I'm not very happy with this right now. I think it could be done (much) better :) Now, one has to do this: if(!isset($HTTP_SESSION_VARS['count'])) $HTTP_SESSION_VARS['count'] = 0; echo "count: ", $count = $HTTP_SESSION_VARS['count'] + 1; The array is for reading only. To store the new value, $count must be set. My proposal: echo "count: ", ++$HTTP_SESSION_VARS['count']; This behaviour whould make session handling even easier than it is today ;) To session_register(): $HTTP_SESSION_VARS['foobar'] = 'my value i want to store'; To session_unregister(): unset($HTTP_SESSION_VARS['foobar']); To session_is_registered(): isset($HTTP_SESSION_VARS['foobar']); Hm.. or is this possible? Are I'm missing something? -Jade. PS: This behaviour could be emulated with an auto-prepend file that just registers an array. But I think this lacks beauty. On Wed, Mar 08, 2000 at 08:57:44AM -0600, Andrei Zmievski wrote: > On Wed, 08 Mar 2000, Sascha Schumann wrote: > > > Automatically registering everything that's in $HTTP_STATE_VARS[] on > > > register_globals=off might be possible. I need more feedback from people > > > to see whether this is such a good idea. As far as your question, I > > > don't quite understand what you mean. The best way is not obvious to me. > > > > Sounds reasonable. We should make this the default behaviour, when > > register_globals is off. > > OK, should be done. > > -Andrei -- =============================================================================== Jade Nicoletti Nicoletti Net Services Tel. 01 240 4774 Geschäftsleitung Postfach 2519 Fax 01 240 4775 System-Administration 8021 Zürich ============================================[ Weitere Infos: http://nns.ch/ ]==

« previous php.version4 (#14074) next »