function get_arr($arr)
{
unset($arr[0]);
}
$arr1 = array(1,2);
$arr2 = array(1,2);
get_arr(&$arr1);
get_arr($arr2);
echo count($arr1);
echo count($arr2);
I got:
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of get_arr(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file
Ama çıkış:
12
Hangi çağrı süresi referans etkisini alır demektir.
Neden iki yerde çıktı çelişen mesajlar?