[ZendTo] Feature request: optional units on some preferences
Adam Thorn
alt36 at cam.ac.uk
Thu Dec 10 18:03:10 GMT 2020
On 10/12/2020 16:55, Jules via ZendTo wrote:
> Will people always get the case right, even when they never read the
> instructions?
> Or do I only insist on "m" and "M" having the right case, and ignore the
> case on all the others?
> Bit awkward. Only other option is to infer whether it's a byte count or
> a time duration from the name of the setting (/bytes/i ==> byte count,
> rules like that).
My immediate instinct is to suggest case-sensitivity, because SI
prefixes are case-sensitive and m=milli vs M=mega are rather different!
But,.. for the size units it might be best to mirror the options
specified in
https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes :
i.e. accept K/k, M/m, G/g, and use them to mean the "power of 2" values
rather than "power of 10".
Adam
More information about the ZendTo
mailing list