In theory (never tested myself) it should work like that
Internally
EDIT: changed the array and the call to make it more clear.
Code:
public function update_data(){$args = ['data' => ['var_1'=> 1,'var_2'=> 1,'var_3'=> 0,]];return [// Call a custom callable function to perform more complex operations.['custom', [[$this, 'callable_install'], $args]],];}public function callable_install($data){// Run some SQL queries on the database}
Internally
call_user_func_array($callable, $parameters);
is used, so it follows https://www.php.net/manual/en/function. ... -array.phpEDIT: changed the array and the call to make it more clear.
Statistics: Posted by rxu — Fri Apr 11, 2025 1:52 pm