drlenux / large-array
Array for big data, big array, large array, memory array
1.1.1
2023-11-01 14:59 UTC
Requires
- php: >5.6
- ext-sqlite3: *
Requires (Dev)
- phpunit/phpunit: ^10.4
README
PHP Array Implementation with SQLite3
Designed for storing large datasets as an array.
Please note: If you have a very large array, consider reevaluating your architecture rather than using this code. Use this library only in exceptional cases.
Installation
You can install this package via Composer:
composer require drlenux/large-array
Usage
use Drlenux\LargeArray\LargeArray; $array = new LargeArray(/** optional salt **/); $array = new LargeArray('for report'); for ($i = 0; $i < 1_000_000; $i++) $array[] = $i; $array['test'] = 'test value'; $array['sub']['array'] = true; // don't use, 'cause return null $array['sub'] = ['array' => true]; // it's correct $array->in(5000); // result: true [instead of in_array] $array[5000] // result: 5000 $array['test'] // result: test value
LargeArray use interface ArrayAccess, Countable, Iterator
Security
If you discover any security-related issues, please email oleksii@bielokudrenko.family instead of using the issue tracker.
License
This package is open-source software licensed under the MIT license.