Cannot assign by reference to overloaded object object(foo)#1 (1) { ["var":"foo":private]=> NULL }