Check and assign value of a PHP object property within an conditional
<p>Would the following work in PHP:</p>

<pre><code>if ($test = $object-&gt;property) {
  // Do stuff with $test
}
</code></pre>

<p>Basically, PHP will still spit out notices even if $object->property isn't set.  I want to see if it's possible to check to see if the value is set and assign a property to a variable within a conditional.  Otherwise, I would have to do something like this:</p>

<pre><code>if (isset($object-&gt;property) {
  $test = $object-&gt;property;
  // Do stuff with $test
}
</code></pre>
