So it'd be possible to do something like this...
PHP Code:
temp.blah = new TStaticVar();
temp.blah.toString = function () {
return "Hello";
};
echo(temp.blah); // this would echo Hello
This should also work in any case where you do something like
(@temp.blah).
It would probably make most sense if by default
toString was:
PHP Code:
temp.blah.toString = function () {
return this.name;
};
This way there would be no "magic" happening when something gets cast to a string.
Also, this would mean more compatibility with JavaScript.