PHP code example of drlenux / large-array

1. Go to this page and download the library: Download drlenux/large-array library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

drlenux / large-array example snippets



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

bash
composer