title: &$variable in PHP
body: <p>I have been looking through wordpress's core files and stumbled across this piece of code, I noticed it had an ampersand before a variable name and after an =. </p>
  
  <p>I have tried searching this and came across <a href="http://www.php.net/manual/en/functions.arguments.php" rel="noreferrer">this</a> from the PHP manual and it doesn't explain it well, or I'm looking at the wrong one! I also saw that it is used to modify a variable outside of the method where it is being used, but, thats what a variable is there for, to be modified so if this is correct how would one use it?</p>
  
  <pre><code>function _make_cat_compat( &amp;$category ) {
  
      if ( is_object( $category ) ) {
          $category-&gt;cat_ID = &amp;$category-&gt;term_id;
          $category-&gt;category_count = &amp;$category-&gt;count;
          $category-&gt;category_description = &amp;$category-&gt;description;
          $category-&gt;cat_name = &amp;$category-&gt;name;
          $category-&gt;category_nicename = &amp;$category-&gt;slug;
          $category-&gt;category_parent = &amp;$category-&gt;parent;
      } elseif ( is_array( $category ) &amp;&amp; isset( $category['term_id'] ) ) {
          $category['cat_ID'] = &amp;$category['term_id'];
          $category['category_count'] = &amp;$category['count'];
          $category['category_description'] = &amp;$category['description'];
          $category['cat_name'] = &amp;$category['name'];
          $category['category_nicename'] = &amp;$category['slug'];
          $category['category_parent'] = &amp;$category['parent'];
      }
  }
  </code></pre>