Util
in package
Table of Contents
Methods
- isAssoc() : bool
- Test if array is an associative array
- mergeAssocArray() : mixed
- Merge contents from one associtative array to another
- isList() : bool
Methods
isAssoc()
Test if array is an associative array
public
static isAssoc(array<string|int, mixed> $arr) : bool
Note that this function will return true if an array is empty. Meaning empty arrays will be treated as if they are associative arrays.
Parameters
- $arr : array<string|int, mixed>
Tags
Return values
boolmergeAssocArray()
Merge contents from one associtative array to another
public
static mergeAssocArray(mixed $to, mixed $from[, DataInterface::PRESERVE|DataInterface::REPLACE|DataInterface::MERGE $mode = DataInterface::REPLACE ]) : mixed
Parameters
- $to : mixed
- $from : mixed
- $mode : DataInterface::PRESERVE|DataInterface::REPLACE|DataInterface::MERGE = DataInterface::REPLACE
Tags
isList()
private
static isList(mixed $value) : bool
Parameters
- $value : mixed