When I run the following code with condition_2 being the match result the content of $foo is a closure instance, but I want the result that should be returned by that closure. How do you do this? condition_1 is working as expected.
$foo = match ($conditions) {
'condition_1' => 'some text',
'condition_2' => function () {
$result = '';
// crazy programming
return $result;
}
}