Erro fatal do PHP: limite de memória de 134217728 bytes (128 MB) esgotado
Olá a todos! Sou um desenvolvedor PHP iniciante e, ao executar um script no servidor local (OpenServer), recebo constantemente o erro:
```
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in D:\projects\parser\index.php on line 45
```
Tenho um parser simples de notícias de outro site — estou coletando títulos e links usando Simple HTML DOM Parser. O script processa cerca de 5000 páginas. Aqui está um exemplo do meu código:
```php
find('h2.news-title a') as $link) {
$title = $link->plaintext;
$href = $link->href;
echo "$title - $href\n";
}
// Eu pensei que estava limpando a memória
$html->clear();
unset($html);
}
echo "Pronto!";
?>
```
O problema ocorre por volta da 200ª iteração. Tentei aumentar o memory_limit no php