ArrayUtils
Search…
Introduction
📖
How to use?
📖Methods
📖Prefixs
⚡
Prefix - From
⚡
Prefix - As
links
📌Github repo
📌Packagist project
📌Poggit project
Powered By
GitBook
⚡
Prefix - From
Prefixing "From" to the any methods can called statically.
Prefixing "From" to the any methods can called statically. It can be used by giving an
iterable
as the first argument.
Example
is same to
1
$arr
=
ArrayUtils
::
reverseFrom
([
1
,
2
,
3
,
4
,
5
]);
2
3
var_export
((
array
)
$arr
);
4
//array (0 => 5, 1 => 4, 2 => 3, 3 => 2, 4 => 1
Copied!
1
$arr
=
ArrayUtils
::
from
([
1
,
2
,
3
,
4
,
5
])
->
reverse
();
2
3
var_export
((
array
)
$arr
);
4
//array (0 => 5, 1 => 4, 2 => 3, 3 => 2, 4 => 1
Copied!
Previous
📖Prefixs
Next
Prefix - As
Last modified
1yr ago
Copy link