|
Posted by Csaba Gabor on 11/06/07 19:27
In the following PHP code, the final printed line shows 'frob:
something'. Why is it not 'frob: else'? After all, if I replace the
first line with $frob = "something"; test ($frob); then the final
printed line does show 'frob: else'
Csaba Gabor from Vienna
PHP 5.2.4 on WinXP Pro
test ($frob = "something");
print "frob: $frob <br>\n";
function test(&$val) {
print "val pre: $val <br>\n";
$val = "else";
print "val post: $val <br>\n"; }
Navigation:
[Reply to this message]
|