This function gives you the number of bytes available as free space in a directory. The result is always a float (in order to hold a larger value than an integer). If the directory doesn’t exist, false is returned.

If you give a file instead of a directory, the function’s behaviour is unspecified.

$bytes = disk_free_space('/php/dev/');  // 38416797696
$bytes = disk_free_space('/php/devq/'); // false