title: Does PHP grok null references?
body: <p>I want to define a PHP function with an reference parameter, by default, a null reference. Not very much unlike what the following C++ code would do:</p>
  
  <pre><code>ReturnType my_function(moar lulz, ParameterType* ptr_to_my_param = 0)
  {
      // do some processing using lulz only
      // ...
  
      if (ptr_to_my_param)
      {
          // use *ptr_to_my_param
          // or   ptr_to_my_param-&gt;
          // ...
      }
  
      // do more processing, again using lulz only
      // ...
  }
  </code></pre>
  
  <p>How do I do that in PHP?</p>