# File Deletion 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/file-deletion-on-windows/>

Since PHP 7.3, file descriptors are opened on Windows in shared read/write/delete mode by default. This brings the default behaviour on Windows (almost) in line with how POSIX-compliant systems open file descriptors by default. It also allows the deletion of files that have open file descriptors.

There are still some differences between UNIX-based systems and Windows. For instance, after a file is deleted the filename entry is blocked until all open file descriptors for it have been closed.

---

Previous: [memory_limit on Windows](https://php7explained.com/new-and-extended-functionality/io-and-filesystem/memory_limit-on-windows/index.html.md) | Next: [Username and Password in PDO DSN](https://php7explained.com/new-and-extended-functionality/io-and-filesystem/username-and-password-in-pdo-dsn/index.html.md)
