Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return all the keys or a subset of the keys of an array
<?php array_keys(array $array): array
<?php                         break;

                    }



                    $entries = array_unique(array_keys($entries));



                    if (count($entries) === 0) {

                        continue;
<?php         $seconds = $this->getSeconds($ttl);



        if ($seconds <= 0) {

            return $this->deleteMultiple(array_keys($values));

        }



        $result = $this->store->putMany($values, $seconds);
<?php     public static function divide($array)

    {

        return [array_keys($array), array_values($array)];

    }
<?php     public static function map(array $array, callable $callback)

    {

        $keys = array_keys($array);



        try {

            $items = array_map($callback, $array, $keys);
<?php     public function keys()

    {

        return new static(array_keys($this->items));

    }
<?php         foreach (array_keys($results) as $key) {

            $results[$key] = $this->items[$key];

        }
<?php     public function getNames(): array

    {

        return array_keys($this->commandMap);

    }

}
<?php             $uniqueCommandNames = array_map(function ($index, $value) {

                return "$value [$index]";

            }, array_keys($commandNames), $commandNames);



            $selectedCommand = select('Which command would you like to run?', $uniqueCommandNames);
<?php     {

        return $driver.':'.implode(';', array_map(function ($key) use ($arguments) {

            return sprintf('%s=%s', $key, $arguments[$key]);

        }, array_keys($arguments)));

    }
<?php         ];



        return str_replace(

            array_keys($replace), array_values($replace), parent::buildClass($name)

        );

    }
<?php     public function withoutGlobalScopes(?array $scopes = null)

    {

        if (! is_array($scopes)) {

            $scopes = array_keys($this->scopes);

        }



        foreach ($scopes as $scope) {
<?php         }



        if (is_null($update)) {

            $update = array_keys(reset($values));

        }



        return $this->toBase()->upsert(
<?php     public function withoutEagerLoad(array $relations)

    {

        $relations = array_diff(array_keys($this->model->getRelations()), $relations);



        return $this->with($relations);

    }
<?php             ->keyBy($this->first()->getKeyName());



        $attributes = Arr::except(

            array_keys($models->first()->getAttributes()),

            $models->first()->getKeyName()

        );
<?php         if (count($attributes) !== count($fillable) &&

            static::preventsSilentlyDiscardingAttributes()) {

            $keys = array_diff(array_keys($attributes), array_keys($fillable));



            if (isset(static::$discardedAttributeViolationCallback)) {

                call_user_func(static::$discardedAttributeViolationCallback, $this, $keys);