Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TArray

This class does array processing and then method chaining allows for smart coding like in Kotlin and similar languages.

Sample

$array = new TArray();
$array->set("name", "john");

// return "john"
$name = $array->find("name");
$array = new TArray();
$array->push(1);
$array->push(2);
$array->push(3);

// return 1
$number = $array->find(0);
$array = new TArray([1, 2, 3]);

// return [3, 2, 1]
$result = $array->valueDescend()->all();

// return [2, 4, 6]
$result = $array->map(fn (int $_, int $value) => $value*2)->all();

About

This class does array processing and then method chaining allows for smart coding like in Kotlin and similar languages.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages