NYCPHP Meetup

NYPHP.org

[nycphp-talk] Passing Objects Via Session in PHP 4

Chris Shiflett shiflett at php.net
Mon Sep 27 15:20:24 EDT 2004


--- Phillip Powell <phillip.powell at adnet-sys.com> wrote:
> Ok I'm sorry I have to ask this: Why is it specific to just $_SESSION 
> that it auto-serializes anything you put into it?

It wouldn't be very intuitive otherwise. Imagine doing something like
this:

$foo = array('a', 'b', 'c');
$_SESSION['foo'] = $foo;

It wouldn't make much sense if you were to echo $_SESSION['foo'] on
another page and get:

Array

Maybe I don't understand the question...

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly     HTTP Developer's Handbook - Sams
Coming December 2004        http://httphandbook.org/



More information about the talk mailing list