pschultz/php-bytes

Converts PHP's short hand byte strings into bytes: bytes('1K') == 1024

Maintainers

Package info

github.com/pschultz/php-bytes

pkg:composer/pschultz/php-bytes

Statistics

Installs: 225

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2017-04-11 10:11 UTC

This package is auto-updated.

Last update: 2026-02-28 02:11:43 UTC


README

Provides the function \bytes(string) : int, which converts shorthand memory
notations (such as in ini settings) into number of bytes:

    bytes('1K') == 1024

The second function, \memory_limit_bytes(void), returns either the memory
limit in bytes, or INF if there is no memory limit.