Hello,
Could you tell me why a zval cannot be both reference AND value ??
This behaviour leads to this amazing thing :
$var1='Hello';
$var2=$var1; <-- var2 is a "pointer" to var1, sounds normal...
$var3=& $var2 ;
wow... Now $var2 has its own zval memory, It doesn't point anymore to
$var1 !??
I guess, the flag "is_ref" is involved, but I'm not sure...
Anyway, sounds complicated (I mean internally) for a "simple"
assignment.
Thanks...
Could you tell me why a zval cannot be both reference AND value ??
This behaviour leads to this amazing thing :
$var1='Hello';
$var2=$var1; <-- var2 is a "pointer" to var1, sounds normal...
$var3=& $var2 ;
wow... Now $var2 has its own zval memory, It doesn't point anymore to
$var1 !??
I guess, the flag "is_ref" is involved, but I'm not sure...
Anyway, sounds complicated (I mean internally) for a "simple"
assignment.
Thanks...
Comment