ArrayUtils
Search…
Introduction
📖
How to use?
📖Methods
📖Prefixs
⚡
Prefix - From
⚡
Prefix - As
links
📌Github repo
📌Packagist project
📌Poggit project
Powered By
GitBook
⚡
Prefix - As
Prefixing "As" to the chaining method for returns a pure array.
Prefixing "As" to the chaining method for returns a pure array. Method chaining breaks if you use this prefix.
Example
is same to
1
$arr
=
ArrayUtils
::
from
([
1
,
2
,
3
,
4
,
5
]);
2
3
var_export
(
$arr
->
reverseAs
());
4
//array (0 => 5, 1 => 4, 2 => 3, 3 => 2, 4 => 1)
Copied!
1
$arr
=
ArrayUtils
::
from
([
1
,
2
,
3
,
4
,
5
]);
2
3
var_export
((
array
)
$arr
->
reverse
());
4
//array (0 => 5, 1 => 4, 2 => 3, 3 => 2, 4 => 1)
Copied!
Previous
Prefix - From
Last modified
1yr ago
Copy link