title: Setting PHP memory limit in XAMPP
body: <p>I've noticed a strange behaviour in <code>XAMPP v3.3.2</code> with the <code>PHP</code> memory limit settings. My computer has <code>Windows 10</code> installed and I have <code>8GB of memory</code>. In my <code>php.ini</code> file the memory limit is set to <code>1024M</code>. I also made this basic php file for testing:</p>
  
  <pre><code>&lt;?php
  
  echo ini_get('memory_limit');
  exit;
  ?&gt;
  </code></pre>
  
  <p>Running this file with different command line parameters, these are the outputs that I am getting:</p>
  
  <p><code>php -d memory_limit=512M test.php</code> outputs <strong>512M</strong><br>
  <code>php -d memory_limit=2048M test.php</code> outputs <strong>2048M</strong><br>
  <code>php -d memory_limit=4096M test.php</code> outputs the following error message: </p>
  
  <pre><code>PHP Fatal error:  Allowed memory size of 262144 bytes exhausted (tried to allocate 341351 bytes) in Unknown on line 0
  
  Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 341351 bytes) in Unknown on line 0
  </code></pre>
  
  <p><code>php -d memory_limit=5000M test.php</code> outputs <strong>5000M</strong> but I still believe that it is not using 5000M of memory (runned some extended tests populating arrays with numbers, and both the test with <code>2048M</code> set and with <code>5000M</code> set exits at the same number, with the same message:</p>
  
  <pre><code>PHP Fatal error:  Out of memory (allocated 1457258496) (tried to allocate 134217728 bytes) in C:\xampp\htdocs\test\extended_test.php on line 733
  
  Fatal error: Out of memory (allocated 1457258496) (tried to allocate 134217728 bytes) in C:\xampp\htdocs\test\extended_test.php on line 733
  </code></pre>
  
  <p><br></p>
  
  <p>I've stumbled upon this when trying to allocate more memory to a script that should run on my computer. Any ideas what could be causing this?</p>