I've tried to refactor my code by using the list() php function but it returns null and I am not sure what I am not doing well. My code:
public function test() {
// content
return ['variable' => $variable, 'variable1' => $variable1];
}
//
list($variable, $variable1) = test();
I thought that's the way to use list(). Can someone give me a hint on what I am not doing alright?