Lines Matching refs:user_data
19 $user_data = ["sum" => 42];
25 var_dump(array_walk($ar, $func, $user_data));
27 var_dump($user_data["sum"]);
31 $user_data = ["sum" => 42];
32 $func = function($value, $key) use (&$user_data) {
33 var_dump($user_data);
34 $user_data["sum"] += $value;
37 var_dump(array_walk($ar, $func, $user_data));
39 var_dump($user_data["sum"]);
44 $user_data = (object)["sum" => 42];
50 var_dump(array_walk($ar, $func, $user_data));
52 var_dump($user_data->sum);
64 $user_data = (object)["sum" => 42];
66 var_dump(array_walk($ar, "sum_it_up_object", $user_data));
68 var_dump($user_data->sum);
79 $user_data = ["sum" => 42];
81 var_dump(array_walk($ar, "sum_it_up_array", $user_data));
83 var_dump($user_data['sum']);