rastkocvetkovic
Programmer
Could somebody write a solution that would get the parameters by reference so that the code:
<?
$string = "this is cool";
function by_reference($something) {
$something = "this is new";
}
by_reference($string);
echo $string;
?>
Would output "this is new" and not "this is cool".
I assume that all functions in PHP get parameters by value, how to transfort the $something to C++ style var $something. Thank you for answers!
<?
$string = "this is cool";
function by_reference($something) {
$something = "this is new";
}
by_reference($string);
echo $string;
?>
Would output "this is new" and not "this is cool".
I assume that all functions in PHP get parameters by value, how to transfort the $something to C++ style var $something. Thank you for answers!