Mega Code Archive

 
Categories / Php / Functions
 

Passing Variables as a Reference to the Argument of a Function

<?php   function somefunct ($somearg){     $somearg += 3;   }   $othernum = 12;   somefunct ($othernum);   echo "$othernum","\n";      somefunct (&$othernum);   echo "$othernum","\n";   ?>