PHP 7 disk_free_space() Function
❮ PHP Filesystem ReferenceExample
Return the free space, in bytes, of the C: directory:
<?php
echo disk_free_space("C:");
?> 
The output of the code above could be:
109693288448
Definition and Usage
The disk_free_space() function returns the free space, in bytes, of the specified filesystem or disk.
Tip: Look at the disk_total_space() to get the total size of a filesystem or disk.
Syntax
disk_free_space(directory)
| Parameter | Description | 
|---|---|
| directory | Required. Specifies the filesystem or disk to check | 
Technical Details
| Return Value: | The number of free space (in bytes) on success, FALSE on failure | 
|---|---|
| PHP Version: | 4.1+ | 
❮ PHP Filesystem Reference

