At 12:55 AM +0100 8/20/08, Ford, Mike wrote:
Content-Type: text/plain
Content-length: 1998

Been on holiday, so coming to this party a bit late, but....

On Sat 16/08/2008 15:06 Stut wrote:
 On 16 Aug 2008, at 14:46, tedd wrote:
 > At 2:11 PM +0100 8/16/08, Stut wrote:
 >> Ahh, I see the problem. You've never been able to use numbers as
 >> keys at the root level of the $_SESSION array. It's not a bug, it's
 >> just the way it is. I've just checked the documentation and can't
 >> find an obvious reference to this limitation which is kinda annoying.

Well at http://www.php.net/manual/en/session.examples.php there's a big fat Note at the top of the page which includes the following: "The keys in the $_SESSION associative array are subject to the same limitations as regular variable names in PHP, i.e. they cannot start with a number and must start with a letter or underscore.".

Yeah, but that's no fair -- you read the documentation.  :-)

Seriously, however, the thing that bothered me wasn't the limitations in keys, that's understandable, but rather if you do use a numeric index, then all the legal session variables declared after that incident no longer work.

Imagine having ten session variables working and then adding another with a numeric index between sessions five and six declarations.

I can see the session with the numeric index not working, but why would sessions six through ten stop?

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to