arrayutils
  • Home
  • 📖How to use?
    • ⚡Installation
  • 📖Methods
    • ⚡Static method
      • static from()
      • static of()
      • static mapToArray()
    • ⚡Generic method
      • join()
      • every()
      • some()
      • reduce()
        • reduceRight()
      • sum()
      • pop()
      • shift()
      • includes()
      • keyExists()
      • indexOf()
      • find()
        • findIndex()
      • first()
        • keyFirst()
      • last()
        • keyLast()
      • random()
        • keyRandom()
      • splice()
    • ⚡Chain method
      • chunk()
      • column()
      • combine()
      • concat()
        • concatSoft()
      • countValues()
      • diff()
        • diffAssoc()
        • diffKey()
      • fill()
        • fillKeys()
      • filter()
      • flat()
        • flatMap()
      • flip()
      • forEach()
      • intersect()
        • intersectAssoc()
        • intersectKey()
      • keys()
      • map()
        • mapAssoc()
        • mapKey()
      • pad()
      • push()
      • replace()
      • reverse()
      • slice()
      • sort()
        • sortKey()
      • unique()
      • unshift()
      • values()
  • 📖Suffixes
    • ⚡Suffix - From
    • ⚡Suffix - As
  • links
    • 📌Github repo
    • 📌Packagist project
    • 📌Poggit project
Powered by GitBook
On this page
  • Support prefix
  • Method list
  1. 📖Methods

⚡Chain method

The chaining-methods is member methods that returns an ArrayUtils instance.

Previoussplice()Nextchunk()

Last updated 4 years ago

This chaining-method returns an ArrayUtils instance. Because of this, allowing the calls to be chained together in a single statement without requiring variables to store the intermediate results.

For a detailed description of the method chaining method,

Support prefix

You can use two prefix at once.

var_export(ArrayUtils::reverseFromAs([1,2,3,4,5]));
//array (0 => 5, 1 => 4, 2 => 3, 3 => 2, 4 => 1)

Method list

🔖
🔖
click here
⚡Suffix - From
⚡Suffix - As
chunk()
column()
combine()
concat()
concatSoft()
countValues()
diff()
diffAssoc()
diffKey()
fill()
fillKeys()
filter()
flat()
flatMap()
forEach()
intersect()
intersectAssoc()
intersectKey()
keys()
map()
mapAssoc()
mapKey()
pad()
push()
replace()
reverse()
slice()
splice()
sort()
sortKey()
unique()
unshift()
values()