$path = "/////////.";
echo filesize( $path );
result is 4096
What the ... fail is this? from whence is this 4096 ?
Answer:
$path = "/////////.";
although looking weird, the path refers to the root of the filesystem, the same as /, what is a directory. On most filesystems a directory takes at least 4096 bytes to store (what is the size of one sector of a harddisk, the smallest allocation unit for most filesystems). The size can be even bigger if there are many files stored in that directory. But in the system root there are usually only the standard system directories, therefore just 4096.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With