PHP: Handling return of function without storing?
<p>Let's say that I have a library in my application that returns an array. Is it possible to access the array without, in beforehand, storing it as an variable in my scope?</p>

<p>The below shown code clearly doesnt work, but is something similar to this possible?</p>

<p>Example of what I would like to do:</p>

<pre><code>if(isSet($myLibrary-&gt;create_nice_array()['element'])) {
    //...
}
</code></pre>

<p>Example of what I need to do right now:</p>

<pre><code>$temp_array = $myLibrary-&gt;create_nice_array();

if(isSet($temp_array['element'])) {
    //...
}
</code></pre>
