David Harkness wrote:
> Ah, so assigning a reference to a variable already holding a reference
> changes that variable's reference only in the same way that unsetting a
> reference doesn't unset the other variables referencing the same thing, yes?
>
> $a = 5;
> $b = &$a;
> print $a;
>> 5
> unset
Ah, so assigning a reference to a variable already holding a reference
changes that variable's reference only in the same way that unsetting a
reference doesn't unset the other variables referencing the same thing, yes?
$a = 5;
$b = &$a;
print $a;
> 5
unset($b); // does not affect $a
print $a;
>
> -Original Message-
> From: Daniel Kolbo [mailto:kolb0...@umn.edu]
> Sent: 11 July 2010 23:19
>
> Hello PHPers,
>
> I'm having some trouble understanding some PHP behaviour. The
> following
> example script exhibits the behaviour which I cannot understand.
I'm pretty sure that this is
Richard Quadling wrote:
> On 13 July 2010 09:46, Richard Quadling wrote:
>> On 12 July 2010 22:54, Daniel Kolbo wrote:
>>> Richard Quadling wrote:
On 11 July 2010 23:19, Daniel Kolbo wrote:
> Hello PHPers,
>
> I'm having some trouble understanding some PHP behaviour. The follow
Richard Quadling wrote:
> On 12 July 2010 22:54, Daniel Kolbo wrote:
>> Richard Quadling wrote:
>>> On 11 July 2010 23:19, Daniel Kolbo wrote:
Hello PHPers,
I'm having some trouble understanding some PHP behaviour. The following
example script exhibits the behaviour which I c
On 13 July 2010 09:46, Richard Quadling wrote:
> On 12 July 2010 22:54, Daniel Kolbo wrote:
>> Richard Quadling wrote:
>>> On 11 July 2010 23:19, Daniel Kolbo wrote:
Hello PHPers,
I'm having some trouble understanding some PHP behaviour. The following
example script exhibits
On 12 July 2010 22:54, Daniel Kolbo wrote:
> Richard Quadling wrote:
>> On 11 July 2010 23:19, Daniel Kolbo wrote:
>>> Hello PHPers,
>>>
>>> I'm having some trouble understanding some PHP behaviour. The following
>>> example script exhibits the behaviour which I cannot understand.
>>> [code]
>>>
Richard Quadling wrote:
> On 11 July 2010 23:19, Daniel Kolbo wrote:
>> Hello PHPers,
>>
>> I'm having some trouble understanding some PHP behaviour. The following
>> example script exhibits the behaviour which I cannot understand.
>> [code]
>> >
>> class A
>> {
>>public static $a = 3;
>>
On 11 July 2010 23:19, Daniel Kolbo wrote:
> Hello PHPers,
>
> I'm having some trouble understanding some PHP behaviour. The following
> example script exhibits the behaviour which I cannot understand.
> [code]
>
> class A
> {
> public static $a = 3;
>
> function __construct()
>
Hello PHPers,
I'm having some trouble understanding some PHP behaviour. The following
example script exhibits the behaviour which I cannot understand.
[code]
c =& A::$a;
}
}
$c = new C;
$b = new B;
$cee = new C;
var_dump($c->c); // [i] prints object(B), but [ii] prints int 3
v
10 matches
Mail list logo