No, unfortunately, this does not work.
However, if the order of the returned elements is fixed, you can write something like
list($a) = array_values($user->getStatus());
Or you can write a function that returns the value of an array:
$a = my_array_value($user->getStatus(),'keyName');
source
share