You are here

public function SplFixedArray::valid in Automatic Updates 7

Same name and namespace in other branches
  1. 8 vendor/paragonie/sodium_compat/src/PHP52/SplFixedArray.php \SplFixedArray::valid()

Check whether the array contains more elements @link https://php.net/manual/en/splfixedarray.valid.php

Return value

bool true if the array contains any more elements, false otherwise.

File

vendor/paragonie/sodium_compat/src/PHP52/SplFixedArray.php, line 170

Class

SplFixedArray
The SplFixedArray class provides the main functionalities of array. The main differences between a SplFixedArray and a normal PHP array is that the SplFixedArray is of fixed length and allows only integers within the range as indexes. The advantage is…

Code

public function valid() {
  if (empty($this->internalArray)) {
    return false;
  }
  $result = next($this->internalArray) !== false;
  prev($this->internalArray);
  return $result;
}