This represents the size of a media file (in bytes)
| Data type | Property | Description |
|---|---|---|
| int | size | The size, in bytes, of whatever is being checked |
| Visibility | Function (parameters,...): return |
|---|---|
| public | __construct(int $size): void |
| public | GB(): string Convert the size to a GB formatted string |
| public | MB(): string Convert the size to a MB formatted string |
| public | KB(): string Convert the size to a KB formatted string |
| public | bytes(): int Return the size |
$size = new Size(1894113877);
print $size->GB().PHP_EOL; // 1.764 gb
print $size->MB().PHP_EOL; // 1,806.368 mb
print $size->KB(); // 1,849,720.583 kb