Releases: chrisullyott/php-filesize
More efficient handling of integer sizes
v4.2.1 More efficient handling of integer sizes
Add decimal separator argument
Adds an argument defining the decimal separator for numbers. In this release, the same character will be used both when parsing and when formatting the resulting size string.
Improve StringParser regex
Ensures the correct position of the dash for negative values.
Add __toString()
Adds the "toString" method.
Support negative values
In this release, negative values are supported. You may now #add or #subtract negative values, like -20 MB
. Subtracting more bytes than are added will result in negative output, like -20 MB
instead of simply 0
.
Add ability to add/subtract arrays
The add()
and subtract()
methods now accept arrays of items.
Add decimal base support
Decimal fans rejoice... now you can use the decimal system instead of binary. Set 10 as the second argument when instantiating.
Add unit map key lookup arrays
Improves speed by about another 10% on large data sets.
Refactoring
v3.0.1 Refactoring
Refactoring, updated method names
multiply/divide is now multiplyBy/divideBy