ref; # } # ... # } # # foo(); # foo(ref($baz)); class stupid_reference { var $ref; function stupid_reference(&$ref) { $this->ref = &$ref; } } function ref(&$foo) { return new stupid_reference($foo); } ?>