On Sun, 21 Jul 2002, Richard Lynch wrote: ++>I don't use Classes. How it is possible?:))) I prefer OOP and I use it as much as possible even in PHP ++>> $this=&$GLOBALS["cache"]; ++>I would not expect this to work. ++>PHP is going to finalize and return the class, and you're assignment to ++>$this is meaningless. Oh...you can do everything with this in PHP. $this="text",$this=new B(); and it have a sense - j want to replace an object with another. (but i know that it is not supported by other languages) ++> ++>If you want this to work, you'll have to do more like this: it is some solution... ++><?php ++> $cache = array(); ++> function new_A(); ++> global $cache; ++> ++> if (!isset($cache['A'])){ ++> $cache['A'] = new A(); ++> } ++> return $cache['A']; ++> } ++>?> ++> ++>In other words, keep your cache "external" to the actual object ++>implementation. ++> ++>
-- -- pozdr Rad0s Radek Gajewski [EMAIL PROTECTED] GG:694459 ICQ:110153822 -------------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php