PHP Classes

File: tests/encodeSize.php

Recommend this page to a friend!
  Classes of Ali YILMAZ  >  Mind Framework  >  tests/encodeSize.php  >  Download  
File: tests/encodeSize.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Mind Framework
Framework that implements several design patterns
Author: By
Last change:
Date: 3 months ago
Size: 554 bytes
 

Contents

Class file image Download
<?php

require_once '../src/Mind.php';

$Mind = new Mind();

   
// 1 KB
   
echo $Mind->encodeSize(1024);

echo
'<br>';

   
// 1 MB
   
echo $Mind->encodeSize(1048576);

echo
'<br>';

   
// 1 GB
   
echo $Mind->encodeSize(1073741824);

echo
'<br>';

   
// 1 TB
   
echo $Mind->encodeSize(1099511627776);

echo
'<br>';

   
// 1 PB
   
echo $Mind->encodeSize(1125899906842624);

echo
'<br>';

   
// 1 EB
   
echo $Mind->encodeSize(1152921504606850000);

echo
'<br>';

   
// 1 MB
   
$file = array('size'=>1048576);
    echo
$Mind->encodeSize($file);

For more information send a message to info at phpclasses dot org.