Sourcecode
Sort/de/themarcraft/sort/ArrayUtils.php
ArrayUtils.php
<?php
namespace de\themarcraft\sort;
class ArrayUtils
{
public static function fillArray(int $length)
{
$arr = [];
for ($i = 0; $i < $length; $i++) {
$arr[] = rand(1, 100000000);
}
file_put_contents('/home/marvi/sort/array.txt', json_encode($arr));
}
public static function getArray() : array
{
return json_decode(file_get_contents("/home/marvi/sort" . '/array.txt'));
}
}