[Phphtmllib-devel] Strange Class behaviour...
Status: Beta
Brought to you by:
hemna
From: Mark L. <no...@nu...> - 2003-07-07 14:08:42
|
Hi, I haven't seen much activity on this list, so I hope you are all still around :-) The following code is giving me problems: class NewTheme { var $page, $content; function NewTheme () { $this->$page =& new HTMLPageClass($title, XHTML_TRANSITIONAL); print get_class($this->$page) . "<br>"; $this->$content =& new DIVtag; print get_class($this->$page) . "<br>"; } } The output of this is: htmlpageclass divtag when I would have expected it to be htmlpageclass htmlpageclass Specifically, it appears that creating a new DIVtag object is overwriting the value of the $page variable. I have read a lot of comments about classes and object in php in general, but I can't determine if this is a generic problem or not. Any clues on how to work around this behaviour? Cheers, Mark. -- Mark Lawrence |