![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
Hrml... I found the most interesting possibly bug today in PHP.... perhaps someone could help me verify this?
class User
{
var $nothing;
function User( )
{
return;
}
}
$_SESSION[user][7] = array( "Test1", "Test2" );
print_r( $_SESSION );
$user = new User;
print_r( $_SESSION );In my case $_SESSION[user] was being overwritten with $user. When I changed $_SESSION[user] to $_SESSION[users] the problem went away and $user no longer made its way into the $_SESSION array. I am running php version 4.3.8
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I think that's a "feature", not a bug.
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
A feature? I could not find anything on PHP.net or in my book on this featue... perhaps you could explain a bit more so I know how to avoid this feature in the future
![]() And why would they implement such a feature?
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
No idea, but it seems it's the sort of thing that requires work to implement in the first place - I don't think it could happen by accident. Try PHP 5.0.
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() |
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|