Get the first value from the current array.

@return mixed
<p>Return null if there wasn't a element.</p>
354274
public function first()
    {
        $tmpArray = $this->getArray();

        $key_first = array_key_first($tmpArray);
        if ($key_first === null) {
            return null;
        }

        return $tmpArray[$key_first];
    }
76876
public static <T> T getFirst(T array[]){
        return array!=null && array.length>0 ? array[0] : null;
    }
88032
public function first()
    {
        $this->throwExceptionIfEmpty();

        $keys = $this->keys();
        $keyOfTheFirstElement = $keys->shift();
        return $this->offsetGet($keyOfTheFirstElement);
    }
1340498
public function current()
    {
        if (!is_array($this->val)) {
            return null;
        }
        if ($this->assocArray) {
            $keys = array_keys($this->val);
            return $this->val[$keys[$this->position]];
        }

        return $this->val[$this->position];
    }
368967
public function first()
    {
        $arr = $this->val();
        $first = reset($arr);

        return StdObjectWrapper::returnStdObject($first);
    }
263200
public function getInitialValue()
    {
        if ($this->hasDefaultValue) {
            return $this->defaultValue;
        }

        return $this->isNullable ? null : $this->dataType->getInitialValue();
    }
1254369
public function getPrevious()
    {
        $pos = $this->getPosition();
        if ($pos == 0) {
            return null;
        } else {
            $this->getInternalIterator()->seek($pos - 1);

            return $this->getCurrent();
        }
    }
1182691
public function takeFirst()
    {
        if (count($this->list) <= 0) {
            return null;
        }

        $value = $this->list[0];

        unset($this->list[0]);

        return $value;
    }
359737
public function getPrevious()
    {
        if ($this->isFirst()) {
            return null;
        }

        $this->seek($this->getPosition() - 1);

        return $this->current();
    }
916669
public function first()
    {
        $results = $this->filter('', '', '', ['$top'=> 1]);
        $result = is_array($results) && count($results) > 0 ? $results[0] : null;

        return $result;
    }
593920
public function first()
    {
        try {
            $row = $this->baseQuery->first();

            if ($row === null) {
                return $row;
            } else {
                return $this->processFetchedRow($row);
            }
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
1317620
public function first()
    {
        foreach ($this->dataQuery->firstRow()->execute() as $row) {
            return $this->createDataObject($row);
        }
        return null;
    }
452150
protected function getPrev()
    {
        if (!$this->current)
        {
            return null;
        }
        if ($this->prev !== -1)
        {
            return $this->prev;
        }
        $this->load();
        for ($i = 0; $i < count($this->items); $i++)
        {
            if ($this->items[$i]->id == $this->current->id)
            {
                if ($i > 0)
                {
                    $this->prev = $this->items[$i - 1];
                    return $this->prev;
                }
                break;
            }
        }
        return null;
    }
675693
public function prev()
    {
        $value = prev($this->_data);
        return key($this->_data) !== null ? $value : null;
    }
1174900
public function getFirstChild()
	{
		$xpathStr = self::XPATH_THIS . '*[1]';
		$results = $this->xpath($xpathStr);
		if (count($results) >= 1) {
			return $results[0];
		}
		return null;
	}
527732
public function getFirstImage()
    {
        $images = $this->getImage();
        if ($images) {
            foreach ($images as $image) {
                return $image;
            }
        }

        return null;
    }
817343
public function first()
	{
		/** @var \mysqli_result $rows */
		$rows = $this->runGen(false);
		if ($rows === false) return null;
		while ($row = $rows->fetch_assoc()) {
			$rows->free_result();
			return $row;
		}
		return null;
	}