title: gettype() leaking memory
body: <p>I'm using the <a href="http://www.jaisenmathai.com/articles/twitter-async-documentation.html" rel="nofollow">twitter-async library</a> to do some oauth calls to twitter but ultimately, a lot of memory is being used up. I tried running the xdebug execution trace and this is where I feel the memory is getting leaked.</p>
  
  <p><code>json_decode()</code> is using 47077232 bytes. Okay. This is fine.</p>
  
  <p>But <code>gettype()</code> ? Why should this too be using similar amount of memory?</p>
  
  <p>How could this be prevented?</p>
  
  <p>The script runs in a loop and the memory usage keeps going up. I'm using <code>gc_collect_cycles()</code> at number of places and it is showing improvement. But this one, I can't understand why should this happen.</p>
  
  <pre><code>  724.1772   47077232 +2118720             -&gt; json_decode() /var/www/html/includes/classes/twitter/EpiTwitter.php:230
    724.1926   49157104 +2079872             -&gt; gettype() /var/www/html/includes/classes/twitter/EpiTwitter.php:232
    724.1927   49157104       +0             -&gt; property_exists() /var/www/html/includes/classes/twitter/EpiTwitter.php:240
    724.1927   49153520    -3584     -&gt; EpiTwitterJson-&gt;__destruct() /var/www/html/includes/classes/twitter/EpiTwitter.php:0
    724.1949   46714808 -2438712     -&gt; in_array() /var/www/html/cron.php:156
  </code></pre>