Hmm, dunno as I ever tried. If you want something built into PHP and like to do math, then try [man]disk_total_space/man ...
If you can call [man]exec/man, this should work on 'Nix, and it does the math for you ahead of time:
<?php
$foo=exec("du -h");
echo $foo."\n";
?>
You should be able to hack something similar if the platform is windows ... IIRC, "dir" output contains a "free space" figure.
Of course, the math for [man]disk_total_space[/man] isn't really that hard ... it's on the manual page ... 😉