Minwork Array
  • Minwork Array
  • Common methods
    • has
    • get → getNestedElement
    • set → setNestedElement
    • remove
    • clone
    • getKeysArray
  • Object oriented methods
    • General information
  • Traversing array
    • Finding
    • Iterating
  • Manipulating array
    • Mapping
    • Filtering
    • Grouping
    • Sorting
    • Computations
    • Flattening
  • Validating array
    • check
    • isEmpty
    • isNested
    • isArrayOfArrays
    • isAssoc
    • isUnique
    • isNumeric
    • hasKeys
  • Utility methods
    • pack
    • unpack
    • createMulti
    • forceArray
    • getDepth
    • random
    • shuffle
    • nth
    • getFirstKey
    • getLastKey
    • getFirstValue
    • getLastValue
Powered by GitBook
On this page

Was this helpful?

  1. Validating array

isEmpty

Definition

Arr::isEmpty(mixed $array): bool

Description

Recursively check if all of array values match empty condition.

Examples

Arr::isEmpty(null) -> true

Arr::isEmpty([]) -> true

Arr::isEmpty([0 => [0], [], null, [false]) -> true
Arr::isEmpty([0 => [0 => 'a'], [], null, [false]]) -> false
PreviouscheckNextisNested

Last updated 5 years ago

Was this helpful?