title: register_shutdown_function converting references to values?
body: <p>I'm trying to use a shutdown function that uses a value changed dynamically after registration. My understanding was that passing the variable by reference would allow changes in later portions of the code to affect the shutdown call. The code below demonstrates that this is not the case:</p>
  
  <pre><code>&lt;?php
      $x = 0;
      function shutdown(&amp;$x) {echo $x;}
      register_shutdown_function('shutdown',$x);
      $x = 1;
      exit();
  ?&gt;
  </code></pre>
  
  <p>Am I misunderstanding how this should be done? Is it expected behavior for the register function to convert the reference pass to a value pass?</p>
  
  <p>PHP version 5.5.9</p>