thanks for your reply, stereofrog
i am also wondering, if i don't want to pass in $session as an arguement to the constructor, but instead call it from its global status, would that also not need to use the explicit reference syntax?
i.e.
PHP Code:
$session = new Session();
class User {
var $id;
var $session;
function __construct(){
$this->session = $_GLOBAL['session'];
}
function otherFunction(){
$this->session->setAge(15);
}
}
$user = new User();
would that work as expected? and by working as expected i mean the global $session now points to the same location that $user->session; points to?
thanks for your time,
blayne
Bookmarks