As per Stefan,
Quote:
Assignments are always resolving links, the link() function is more
for passing complex variables to functions
|
He suggested TStaticVars which could get around my array issue like this,
PHP Code:
function onCreated() {
temp.obj1 = new TStaticVar();
temp.obj1.num = 1;
temp.obj2 = new TStaticVar();
temp.obj2.num = 2;
temp.array = {temp.obj1, temp.obj2};
temp.array[0].num = 5;
echo(temp.array[0].num); //Outputs 5
echo(temp.obj1.num); //Outputs 5
temp.obj1.destroy();
temp.obj2.destroy();
}
It works but is definitely not what I had desired.