Suffix - As

Suffixing "As" to the chaining method for returns a pure array.

Suffixing "As" to the chaining method for returns a pure array. Method chaining breaks if you use this Suffix.

$arr = ArrayUtils::from([1,2,3,4,5]);

var_export($arr->reverseAs());
//array (0 => 5, 1 => 4, 2 => 3, 3 => 2, 4 => 1)

Last updated