array_key_exists

Supported Versions: PHP 4 >= 4.0.7, PHP 5, PHP 7, PHP 8
Checks if the given key or index exists in the array
Alias key_exists
<?php array_key_exists(string|int|float|bool|resource|null $key, array $array): bool
<?php     public function has($key)

    {

        return array_key_exists($key, $this->items);

    }



    public function put($key, $value)
<?php         $ordered = [];



        foreach ($order as $key) {

            if (array_key_exists($key, $array)) {

                $ordered[$key] = $array[$key];

                unset($array[$key]);

            }
<?php                 if (! array_key_exists($array_key, $child)) {

                    $child[$array_key] = [];

                    $has_children = false;

                }