Created
May 16, 2012 05:51
-
-
Save jbarciauskas/2707849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("BitArray.php"); | |
$test = new BitArray(128); | |
$test->setBit(12); | |
var_dump($test->toIntArray()); | |
$test2 = new BitArray(128); | |
$test2->setBit(126); | |
var_dump($test2->toIntArray()); | |
$test3 = BitArray::orFn($test, $test2); | |
var_dump($test3->toIntArray()); | |
$test2 = new BitArray(60); | |
$test2->setBit(20); | |
var_dump($test2->toIntArray()); | |
$test3 = BitArray::orFn($test3, $test2); | |
var_dump($test3->toIntArray()); | |
echo memory_get_usage(). "\n"; | |
$test2 = new BitArray(30000000); | |
echo memory_get_usage(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment