Source Code:
(back to article)
<?php // Function applied to assign a new value to // $string variable and printing it function print_string(&$string) { $string = "Function w3docs \n"; // Print $string variable print $string; } // Driver code $string = "Global w3docs \n"; print_string($string); print $string; ?>
Result:
Report an issue