ReflectionObject vs. cast to array vs. get_object_vars for retrieving public vars
<p>I need to get the public properties of an object; is there a preferred method for doing this? I'm wary of using <code>ReflectionObject#getProperties()</code> because of the Reflection API overhead, but between casting the object to an array and using <code>get_object_vars()</code>, is there an established standard or clear performance gain for one or the other?</p>

<p>To be clear, I realize that casting the object to an array will give me <em>all</em> the object's properties, but as protected properties will be prepended with <code>*</code> and private properties will be prepended with the class name, it would still be effective for a quick <code>in_array($property, $properties);</code> call.</p>
