# ARG_INFO and by_ref for objects?

- Thread: https://externals.io/message/18983
- Original archive: https://news-web.php.net/php.internals/18983
- Started by Michael Wallner on 2005-09-15T14:02:07+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #18983 — Michael Wallner — 2005-09-15T14:02:07+00:00

URL: https://externals.io/message/18983#18983

Hi,

as nobody was able to answer my question on IRC,
I just drop it here:

Is it useless (yet even counter-productive) to enable
pass_by_ref in an ARG_INFO section for a function or
method that expects an object?

By "counter-productive" I mean that I'd need to actually
pass an identifier for a variable.

Thanks,
-- 
Michael - < mike(@)php.net

---

## #18986 — Wez Furlong — 2005-09-15T14:23:30+00:00

URL: https://externals.io/message/18983#18986 · In reply to: #18983

Only use references when you need to be able to overwrite the variable.

--Wez.


> Hi,
> 
> as nobody was able to answer my question on IRC,
> I just drop it here:
> 
> Is it useless (yet even counter-productive) to enable
> pass_by_ref in an ARG_INFO section for a function or
> method that expects an object?
> 
> By "counter-productive" I mean that I'd need to actually
> pass an identifier for a variable.
> 
> Thanks,
> --
> Michael - < mike(@)php.net

---

## #18988 — Michael Wallner — 2005-09-15T14:30:04+00:00

URL: https://externals.io/message/18983#18988 · In reply to: #18986

Hi Wez Furlong, you wrote:

> Only use references when you need to be able to overwrite the variable.

Ok, and what about return_by_ref?

Thanks,
-- 
Michael - < mike(@)php.net
