Get variable type from object
<p>Im trying to get the variable type but I dont know why, always says that the variable is a string.</p>

<p>Here is my object:</p>

<p><strong>$question</strong></p>

<pre><code>stdClass Object
        (
            [reply_id] =&gt; 8
            [q_key] =&gt; 35BBs2xy1346230680
            [answer] =&gt; 1
        )


echo $question-&gt;answer." is a ".gettype($question-&gt;answer);
</code></pre>

<p><strong>The output is:</strong></p>

<blockquote>
  <p>1 is a string</p>
</blockquote>

<p>But 1 is a integer...</p>

<p>What am I doing wrong ?</p>
