# Reference of $this in 5.1

- Thread: https://externals.io/message/19070
- Original archive: https://news-web.php.net/php.internals/19070
- Started by Jeff Moore on 2005-09-17T18:11:10+00:00
- Messages: 1
- 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

---

## #19070 — Jeff Moore — 2005-09-17T18:11:10+00:00

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

I'm running into a BC break between 5.1 and 5.0 & 4.x.  It seems like 
some code in 5.1 to prevent re-assigning $this also prevents taking a 
reference of $this.  The following bug report for this situation was 
marked Bogus:

http://bugs.php.net/bug.php?id=34358

However, I would like to ask for an explanation of why

$this->ref =& $this

is a valid usage while

$ref =& $this;

is not.

Thanks,

Jeff Moore
