Classes and session vars

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tekdek
Forum Newbie
Posts: 3
Joined: Mon Nov 17, 2003 11:22 pm

Classes and session vars

Post by tekdek »

hey got 2 questions

1. when do objects die? do they have a time out after they are created form a class? is there a way to kill them?

2. is there a way to get all the session vars form all the users and put them in to a big array?

thanks in advance
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

1. Objects die when GC decides to kill them. (GC - Garbage Collector). GC kills the objects which have no references to it.

2. Do you really need it? Sessions are intended to store the data on per-user basis... though you can implement custom session handling ([php_man]session_set_save_handler[/php_man]).
Post Reply