Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Session PHP Bug

  1. #1
    Regular Coder
    Join Date
    Jun 2004
    Posts
    112
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Session PHP Bug

    Was anyone aware of the PHP session bug(?) that doesn't allow use of numeric indexes? I wasn't until the other day and haven't read anything on php.net about it before.

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Can we get a link to wherever you found this? I've like to read it.
    If I'm postin here, I NEED YOUR HELP!!

  • #3
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,048
    Thanks
    10
    Thanked 93 Times in 91 Posts
    all variables in PHP have to start with a letter or an underscore.
    when you set a super_global like $_SESSION['varname'] , imagine you have register_globals=on (which you shouldn't ) this then can be accessed via $varname, so $_SESSION[1] (in that line of thought) equates to $1 which is not valid.

    That PHP does not give a parse error on attempting to set $_SESSION[1]='blah'; could perhaps be described as a bug ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •