arrayutils
Search…
Home
📖
How to use?
📖Methods
⚡Static method
static from()
static of()
static mapToArray()
⚡Generic method
⚡Chain method
📖Suffixes
links
📌Github repo
📌Packagist project
📌Poggit project
Powered By
GitBook
static of()
The of() static method creates a new, ArrayUtils instance from variadic function arguments
Example.php
1
<?php
use
kim
\
present
\
utils
\
arrays
\
ArrayUtils
;
2
​
3
ArrayUtils
::
of
(
3
,
6
,
9
);
4
// expected output: ArrayUtils(array(3, 6, 9))
Copied!
Syntax
1
ArrayUtils
::
of
(
mixed
...
$elements
)
:
ArrayUtils
Copied!
Parameter
...$elements
Elements used to create the array.
Return value
A new
ArrayUtils
instance.
References
Array.of() - JavaScript | MDN
Previous
static from()
Next
static mapToArray()
Last modified
1yr ago
Copy link
Contents
Syntax
Parameter
Return value
References