PHP Classes
elePHPant
Icontem

File: sets/binary_long.set.php

Recommend this page to a friend!
  Classes of Alex F. Bustos  >  SI Prefix Converter  >  sets/binary_long.set.php  >  Download  
File: sets/binary_long.set.php
Role: Auxiliary script
Content type: text/plain
Description: Binary prefixes in long format
Class: SI Prefix Converter
Convert a number to a string appending a prefix
Author: By
Last change: 1.2 Version. Changed, backward compatible with 1.1. Corrected and added short sets and spanish long version of the prefixes.
Date: 3 years ago
Size: 414 bytes
 

 

Contents

Class file image Download
<?php
//Binary prefixes, IEC. Use base 2, and maybe limits on the exponent from 0 to 40
//Taken and modified from https://en.wikipedia.org/wiki/Binary_prefix
$sci_list=array(
   
0=>array(''),
   
10=>array('kibi'),
   
20=>array('mebi'),
   
30=>array('gibi'),
   
40=>array('tebi'),
   
50=>array('pebi'),
   
60=>array('exbi'),
   
70=>array('zebi'),
   
80=>array('yobi')
);

$sci_min = 0;
$sci_max = 40;
$sci_base = 2;
$sci_space = 10;