note 59843 added to function.filesize

From: Date: Sat, 17 Dec 2005 19:02:43 +0000
Subject: note 59843 added to function.filesize
Groups: php.notes 
Request: Send a blank email to php-notes+get-100342@lists.php.net to get a copy of this message
uhm, no-one of you is really wrong... In general we understand KILO as a prefix for THOUSAND, so in fact one kilobyte is (or should be, at least) 1000 Bytes. Kilobyte should be abbreviated "KB" but it is also correct to say "kB". That's not the difference. In Reality we understand 1024 Bytes as one Kilobyte; but as the prefix "Kilo" is used to denote 1000 Units normally we have a problem here. So the SI-Units were invented (they were not especially invented to solve these problems, they are the standards we already use in physics (e.g. "m" = "meters", "s" = "second", ...). SI-Units interpret Kilobyte as 1000 Bytes, as Kilo means 1000. The Kilobyte having 1024 Bytes is called "Kibibyte" - the correct abbreviation is "KiB". "Kibi" is a mixture if "kilo" and "bi", as 1024 is >>2<< with the exponent 10. Same thing for Megabytes, Gigabytes and so on.... 1 Byte = 8 Bit (mostly we use a lower-case b to designate Bits and an upper-case B for Bytes, => b) 1 KiloByte (KB) = 1000 Bytes (B) 1 MegaByte (MB) = 1000 KiloBytes (KB) 1 GigaByte (GB) = 1000 MegaBytes (MB) => same thing for Tera, Peta, Exa, Zetta, Yotta, Nona, Dogga... (TB, PB, EB, ZB, YB, NB, DB) SI-Units for multiples of "2" (=> bi) 1 KibiByte (KiB) = 1024 Bytes ... so on with the same prefixes as above. For Bits it's the same, but they are abbreviated with a lower-case "b". 1 KiloBit (Kb or kb) = 1000 Bits (1000b) 1 KibiBit (Kib or kib) = 1024 Bits ... same as above then. ---- Manual Page -- http://www.php.net/manual/en/function.filesize.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59843 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59843&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59843&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59843&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59843&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59843&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59843&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59843&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59843&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100342) next »