Re: [PHP] strange reference behavior

2007-09-01 Thread Robert Enyedi
Thanks for the clarifications. Regards, Robert Robert Cummings wrote: On Sat, 2007-09-01 at 11:39 +0100, Martin Ellingham wrote: Robert Enyedi wrote: Hi, I've been studying the PHP reference mechanism (with PHP 5.2.1) and I'm unsure if the following behavior is normal. This code works as

Re: [PHP] strange reference behavior

2007-09-01 Thread Robert Cummings
On Sat, 2007-09-01 at 11:39 +0100, Martin Ellingham wrote: > Robert Enyedi wrote: > > Hi, > > > > I've been studying the PHP reference mechanism (with PHP 5.2.1) and > > I'm unsure if the following behavior is normal. > > > > This code works as expected: > > > > $a = 2; > > $b = &$a; > >

Re: [PHP] strange reference behavior

2007-09-01 Thread Robert Cummings
On Sat, 2007-09-01 at 13:06 +0300, Robert Enyedi wrote: > Hi, > > I've been studying the PHP reference mechanism (with PHP 5.2.1) and I'm > unsure if the following behavior is normal. > > This code works as expected: > > $a = 2; > $b = &$a; > //$c = &$a; > $c = $b; >

Re: [PHP] strange reference behavior

2007-09-01 Thread Martin Ellingham
Robert Enyedi wrote: Hi, I've been studying the PHP reference mechanism (with PHP 5.2.1) and I'm unsure if the following behavior is normal. This code works as expected: $a = 2; $b = &$a; //$c = &$a; $c = $b; $a = 1; echo $c."\n"; // Prints "2" as expected but this

[PHP] strange reference behavior

2007-09-01 Thread Robert Enyedi
Hi, I've been studying the PHP reference mechanism (with PHP 5.2.1) and I'm unsure if the following behavior is normal. This code works as expected: $a = 2; $b = &$a; //$c = &$a; $c = $b; $a = 1; echo $c."\n"; // Prints "2" as expected but thi