Mega Code Archive

 
Categories / Php / Functions
 

Define whether a variable is passed by value or reference

<?php function f1($a) {   $a += 4; } function f2(&$a) {   $a += 10; } $b = 5; f1(&$b); f2($b); echo "\$b = $b\n"; ?>