note 99546 deleted from language.references.pass by googleguy
| From: | googleguy@php.net | Date: | Sun, 23 Feb 2014 17:21:36 +0000 |
| Subject: | note 99546 deleted from language.references.pass by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198608@lists.php.net to get a copy of this message | ||
Note Submitter: northhero at gmail dot com
----
Passing variable reference to function instead of declaring the function parameter type to reference
also could get the result as expected.
<?php
$string = 'string';
function change($str) {
$str = 'str';
}
change(&$string);
echo $string;
?>
yeild
str