now i remember! I wanted some OO functionality without using classes.
If I did this:
PHP Code:
public function increment() {
this.count++;
}
function onCreated() {
x = new TStaticVar;
x.increment = this.increment;
x.count = 1;
x.increment(); //x.count = 2?
}
Will x.count get incremented when x.increment() is called or will count get incremented in the script which created x?