is PHP and C++ the only 2 places that we need to careful about passing a simple data type variable as a function argument and the value can be changed?
such as
$count = 2;
foo($count);
echo $count;
and the 3rd line, echo $count display something other than 2. I only know of PHP and C++ where it can happen. Is there any other place where it can happen?
Update: that is, what looks like "pass by value" is in fact "pass by reference". If it is passing an object in Java, Perl, PHP, Python, and Ruby, it is automatically pass-by-reference and the instance variables' values of the object can be changed. What about passing in non-object?