# `memory_limit` on Windows

> Section in “New and Extended Functionality › I/O and Filesystem” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/new-and-extended-functionality/io-and-filesystem/memory_limit-on-windows/>

Memory consumption of PHP scripts can be limited using the `php.ini` directive `memory_limit`. Some PHP 7 documentation sources, namely `http://windows.php.net` claim that PHP 7 on Windows now supports a memory limit. This suggests that earlier PHP versions did not support this. However, we were unable to find suitable documentation to confirm or deny this.

---

Previous: [getrusage() on Windows](https://php7explained.com/new-and-extended-functionality/io-and-filesystem/getrusage-on-windows/index.html.md) | Next: [File Deletion on Windows](https://php7explained.com/new-and-extended-functionality/io-and-filesystem/file-deletion-on-windows/index.html.md)
