PHP 5 and Shared objects

From: Date: Mon, 21 Apr 2003 19:27:08 +0000
Subject: PHP 5 and Shared objects
Groups: php.general 
Request: Send a blank email to php-general+get-144699@lists.php.net to get a copy of this message
As I've understood that PHP5 OOP will allow us to use a session-level shared objects smoothly, as in example: - file1.php session_register('myObj'); $myObj = new myClass(2003); $x = $myObj->year; // returns 2003 header('location: file2.php?PHPSESID='.session_id()); - file2.php if (isset($_SESSION['myObj'])) { $myObj=$_SESSION['myObj']; echo $myObj->year; // should also return 2003 } am I right? please correct me And if that's correct, is there a way to make a global object over all sessions (immortal object)? can this be a good feature to request?

« previous php.general (#144699) next »