NYCPHP Meetup

NYPHP.org

[nycphp-talk] Sessions in Objects

Scott Mattocks crisscott at netzero.com
Mon Sep 22 16:19:47 EDT 2003


Hello,
What are the issues related to storing objects in sessions?  For 
instance, say I have a shopping cart full of objects that I store in a 
session.  If I want to make a change to an object what kind of overhead 
is associated with it? 
ex:
$cart = $_SESSION['shopping_cart'];
$cart->items[2]->change_size('medium');
$_SESSION['shopping_cart'] = $cart;
Is there another appraoch that might be better?
Thanks,
Scott Mattocks




More information about the talk mailing list