Quote:
Originally Posted by fowlplay4
You have to create a TStaticVar then assign it a variable. I.e:
PHP Code:
function onCreated() { temp.obj2 = test(); echo(temp.obj2.hello); temp.obj2.destroy(); // this also works echo(test().hello); }
function test() { temp.obj = new TStaticVar(); temp.obj.hello = "world"; return temp.obj; }
You can write some neat looking code with it.
|
Ah, I remember using TStaticVar() once about a year ago. Forgot all about it. Indeed, yes you can write some pretty neat code.
Quote:
Originally Posted by fowlplay4
PHP Code:
echo(test().hello);
|
Now that is awesome!!
Thanks alot.
Would rep+ you but I must share the love first, lol.