PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Auslarrie Popier   Binary Array   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example and test script.
Class: Binary Array
Manipulate compact arrays of integers with strings
Author: By
Last change: nc
Date: 12 years ago
Size: 472 bytes
 

Contents

Class file image Download
<?php

  
include("hexarray.php");
   include(
"binarray.php");
   include(
"bytearray.php");
  
  
$m0 = memory_get_usage();
  
$a = new WordArray(32768);
  
$m1 = memory_get_usage();

  
$i = 0;
   while (++
$i < 32768) {
      
$a[$i] = $i+1;
   }

  
$m2 = memory_get_usage();
  
$b = range(1,32768);
  
$m3 = memory_get_usage();
  
   echo
"BinArray: ", $m1-$m0, "\n",
       
"php array: ", $m3-$m2, "\n";
  
# print $a[22];
# print_r($a);