Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return the current element in an array
Alias pos
<?php current(array|object $array): mixed
<?php                 }




                if (is_array($repository) && 1 === count($repository) && false === current($repository)) {

                    $this->disableRepoByName((string) key($repository));

                    continue;

                }
<?php     #[\ReturnTypeWillChange]

    public function current()

    {

        return current($this->decisionQueue);

    }



    public function key(): ?int
<?php     public function valid(): bool

    {

        return false !== current($this->decisionQueue);

    }
<?php         if (count($reasons) === 1) {

            reset($reasons);

            $rule = current($reasons);



            if (!in_array($rule->getReason(), array(Rule::RULE_ROOT_REQUIRE, Rule::RULE_FIXED), true)) {

                throw new \LogicException("Single reason problems must contain a request rule.");
<?php                     if ($alternativeLiterals) {

                        reset($alternativeLiterals);

                        $this->moveWatch($literal, current($alternativeLiterals), $node);

                        continue;

                    }