Lines Matching refs:user_data
11 $user_data = ["sum" => 42];
17 var_dump(array_walk($ar, $func, $user_data));
19 var_dump($user_data["sum"]);
23 $user_data = ["sum" => 42];
24 $func = function($value, $key) use (&$user_data) {
25 var_dump($user_data);
26 $user_data["sum"] += $value;
29 var_dump(array_walk($ar, $func, $user_data));
31 var_dump($user_data["sum"]);
36 $user_data = (object)["sum" => 42];
42 var_dump(array_walk($ar, $func, $user_data));
44 var_dump($user_data->sum);
56 $user_data = (object)["sum" => 42];
58 var_dump(array_walk($ar, "sum_it_up_object", $user_data));
60 var_dump($user_data->sum);
71 $user_data = ["sum" => 42];
73 var_dump(array_walk($ar, "sum_it_up_array", $user_data));
75 var_dump($user_data['sum']);