Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 972 Bytes

File metadata and controls

26 lines (21 loc) · 972 Bytes

Size

This represents the size of a media file (in bytes)

Property List

Data type Property Description
int size The size, in bytes, of whatever is being checked

Function List

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

Examples

$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