Ok, i thought it worked but it doesn't for some reason this wont work:
PHP Code:
r = "something.test";
object.(@r).foo = "Test";
For some reason it thinks there are dots in the var name.

so something.test is listed as a variable in getVarNames() of object.
Strange. Any ideas?