array_intersect_key

Supported Versions: PHP 5 >= 5.1.0, PHP 7, PHP 8
Computes the intersection of arrays using keys for comparison
<?php array_intersect_key(array $array, array ...$arrays): array
<?php         $io = $this->getIO();



        $allowlist = array('name', 'description', 'author', 'type', 'homepage', 'require', 'require-dev', 'stability', 'license', 'autoload');

        $options = array_filter(array_intersect_key($input->getOptions(), array_flip($allowlist)));



        if (isset($options['name']) && !Preg::isMatch('{^[a-z0-9_.-]+/[a-z0-9_.-]+$}D', $options['name'])) {

            throw new \InvalidArgumentException(
<?php                         }

                    }



                    if ($linkType === 'conflict' && isset($this->config['replace']) && $keys = array_intersect_key($this->config['replace'], $this->config['conflict'])) {

                        $this->errors[] = $linkType.'.'.$package.' : you cannot conflict with a package that is also replaced, as replace already creates an implicit conflict rule';

                        unset($this->config[$linkType][$package]);

                    }
<?php         if (isset($manifest['require'], $manifest['require-dev'])) {

            $requireOverrides = array_intersect_key($manifest['require'], $manifest['require-dev']);



            if (!empty($requireOverrides)) {

                $plural = (count($requireOverrides) > 1) ? 'are' : 'is';