title: Returning multiple values: Return array vs change referenced parameters
body: <p>When I need to return multiple values as result of my function (For example, let's say a boolean stating if a specific operation was successful, and a message stating the error or success message), should I return those multiple values in an array, or by making the function arguments be references and change their value?</p>
  
  <pre><code>function myFunction($input){
      ...
      return array("success" =&gt; true/false, "message" =&gt; "Internal Error"/"Success");
  }
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>function myFunction($input, &amp;$success, &amp;$message){
      ...
      $success = true;
      $message = "It worked";
  }
  </code></pre>
  
  <p>What would be considered best practice? I've already seen both in various codebases, even in other languages.</p>