Skip to content

Wrong symbols used for byte conversion #4704

Open
@sreichel

Description

@sreichel
$symbol = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
$exp = floor(log($bytes) / log(1024));

Technically, these are the wrong symbols, (KB=1000, KiB=1024) but that might be for another time

Originally posted by @Hanmac in #4693 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions