What Does =& Mean? [duplicate]
Possible Duplicate:
Reference - What does this symbol mean in PHP?
I've been programming PHP for over 5 years and I've just came across something I have never seen whilst creating a wordpress theme.
$images =& get_children( 'post_type=attachment&post_mime_type=image' );
What does $images =& do? It's the =& I'm concerned about. I have a feeling it's bitwise but I wouldn't understand what it's doing even if it was.
Any help?
Assigns a value by reference
http://www.php.net/manual/en/language.operators.assignment.php
Assignment by reference means that both variables end up pointing at the same data, and nothing is copied anywhere.
=&
is the assignment by reference operator.
You can find out more about references here: http://php.net/manual/en/language.references.php
It's an assign by reference.
http://php.net/manual/en/language.references.pass.php
As opposed to a normal pass by value assignment.
精彩评论