Re: [PHP] strange stuff in a class

2002-07-11 Thread Richard Lynch
>> class test { >> function test() { >> $globals['test2'] = &$this; >> } >> } >> $test1 = new test(); >> >> The problem hier is that $globals['test2'] is a copy of >> $globals['test1'] not a >> references. > >Use "$GLOBALS" rather than "$globals" I think he's building his o

Re: [PHP] strange stuff in a class

2002-07-10 Thread Analysis & Solutions
On Wed, Jul 10, 2002 at 09:50:27AM -, Alex Elderson wrote: > > class test { > function test() { > $globals['test2'] = &$this; > } > } > $test1 = new test(); > > The problem hier is that $globals['test2'] is a copy of > $globals['test1'] not a > references. Use "$GLOBAL

Re: [PHP] strange stuff in a class

2002-07-10 Thread Alberto Serra
ðÒÉ×ÅÔ! > > class test { > function test() { > $globals['test2'] = &$this; > } > } > > $test1 = new test(); > > ?> > > The problem hier is that $globals['test2'] is a copy of $globals['test1'] not a > references. It is, but you are looking in the wrong direction. the co

[PHP] strange stuff in a class

2002-07-10 Thread Alex Elderson
Hi, Do anybody know a work a round for this: The problem hier is that $globals['test2'] is a copy of $globals['test1'] not a references. Anybody an idee? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php