Download the PHP package chrisullyott/php-filesize without Composer

On this page you can find all versions of the php package chrisullyott/php-filesize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-filesize

Latest Stable Version Total Downloads

php-filesize

A flexible package for handling file sizes and converting between units.

Installation

Include in your project, or, install with Composer:

Instantiate

A FileSize object, both on creation and within its methods, understands just about any expression of data size. You may instantiate it with a size, or leave it initially empty.

Convert between units

Use as() to export the size in another format.

A variety of file size strings are supported here as well.

The second argument specifies decimal precision (default is 2).

User-friendly formatting

Use asAuto() to get a user-friendly string:

Optionally, asAuto() also provides a decimal precision.

Or, simply echo the object for the same functionality:

Modify the size

To make changes, use add(), subtract(), multiplyBy(), and divideBy().

Negative values are supported. In the case below, 1.2 megabytes are subtracted:

You may also use add() and subtract() with an array of values:

Number base

The second argument of the constructor is the number base, which accepts either 2 (binary) or 10 (decimal). We use binary by default. To handle sizes in decimal:

Decimal separator

The third argument of the constructor is the decimal separator, which is a period . by default. Here, you can use a comma instead. The chosen decimal separator will be used both to parse numbers properly, and also to format them on output.


All versions of php-filesize with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chrisullyott/php-filesize contains the following files

Loading the files please wait ....