static of()

The of() static method creates a new, ArrayUtils instance from variadic function arguments

Example.php
<?php use kim\present\utils\arrays\ArrayUtils;

ArrayUtils::of(3,6,9);
// expected output: ArrayUtils(array(3, 6, 9))

Syntax

ArrayUtils::of(mixed ...$elements) : ArrayUtils

Parameter

  • ...$elements

    Elements used to create the array.

Return value

  • A new ArrayUtils instance.

References

Last updated