title: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate XX bytes)
body: <p>Initially, it was stated in the settings of 128MB, then I got this error, I thought that maybe did not have enough memory, then I increased to 256MB, but the error continues.</p>
  
  <p>String in code with this error:</p>
  
  <pre><code>function clean($str) {
  $clean_str = stripslashes (trim($str));
  return $clean_str;
  }
  
  // clean slashes
  foreach($result[$i] as $key=&gt;$value) {
   if($key=="currency") continue;
   $result[$i][$key] = clean($result[$i][$key]);
  }
  </code></pre>
  
  <p>Why is this happening ?</p>