<?php class Foo { public function test() { echo 'test'; } } function changeMe(&$obj) { $obj = function(){}; } $foo = new Foo(); var_dump($foo); changeMe($foo); $foo->test();
You have javascript disabled. You will not be able to edit any code.