title: I am facing more memory consumption in Php 7 compare to PHP 5.6
body: <p>When I was doing a benchmark, I found that PHP 7 was using more memory than PHP 5.6.</p>
  <p>So, I did a test. I ran a script containing only:</p>
  <pre><code>  $a=10;
  </code></pre>
  <p>and below are the results for the memory used when I used PHP CLI without any modules (<code>php -n</code>)</p>
  <pre><code>php 5.6 = 222600 Bytes
  php 7.0 = 350448 Bytes
  
  * PHP 5.6.23 (cli) (built: Jun 22 2016 12:13:15)
  Copyright (c) 1997-2016 The PHP Group
  Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies 
  
  * PHP 7.0.9 (cli) (built: Jul 20 2016 10:47:41) ( NTS )
  Copyright (c) 1997-2016 The PHP Group
  Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
  </code></pre>
  <p>Environment is</p>
  <ul>
  <li>OS: window 10</li>
  <li>Server : IIS (although I used the CLI, not the server), with fast cgi</li>
  <li>machine : 64 bit</li>
  <li>php-5.6.23-nts-Win32-VC11-x64</li>
  <li>php-7.0.9-nts-Win32-VC14-x64</li>
  </ul>
  <p>Can anyone explain why I got this result?</p>
  <hr />
  <h1>Additional Tests</h1>
  <p>Using this code, as suggested by @gordon,</p>
  <pre><code>$i=0;
  while ($i++ &lt; 100000) ;
  </code></pre>
  <p>php 5.6: 227408 bytes</p>
  <p>php 7.0: 386640 bytes</p>
  <p>I determined memory usage with this code:</p>
  <pre><code>echo PHP_EOL;
  echo &quot;Memory Usage :&quot;.memory_get_usage();
  echo PHP_EOL;
  echo &quot;Real Memory Usage :&quot;.memory_get_usage(true);
  echo PHP_EOL;
  echo &quot;Real Peak Memory Usage :&quot;.memory_get_peak_usage(true);
  echo PHP_EOL;
  echo &quot;Peak Memory Usage :&quot;.memory_get_peak_usage();
  </code></pre>