[TYPO3-core] '=&' can be found all over the code basis

Jigal van Hemert jigal.van.hemert at typo3.org
Mon Oct 1 07:06:57 CEST 2012


On 1-10-2012 2:55, Philipp Gampe wrote:
> Roland wrote:
>> does '=&' mean soething special or should this be '= &$' in all these
>> cases?
> AFAIK there is no such operator

' =& $var' seems to be equal to '= &$var'. It is used in the 
documentation example in:

> and PHP even always creates objects by reference.

Also not completely true. Object variables don't contain the actual 
object as value, but contain an identifier which allows PHP to find the 
actual object. If you pass, return or assign an object to another 
variable the identifier is copied.
References are aliases of the same variable.


Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org

More information about the TYPO3-team-core mailing list