<?php class A{ } $a = new A(); class B{ public function test($test, $obj = '') { $obj->id = 'test'; } } $b = new B(); $b->test('something', $a); var_dump($a);
You have javascript disabled. You will not be able to edit any code.