array_intersect

Supported Versions: PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8
Computes the intersection of arrays
<?php array_intersect(array $array, array ...$arrays): array
<?php             }



            if (!empty($packages)) {

                $packages = array_intersect($packages, $requires);

            } else {

                $packages = $requires;

            }
<?php             $isDownloadsModifyingPlugin = $package->getType() === 'composer-plugin' && ($extra = $package->getExtra()) && isset($extra['plugin-modifies-downloads']) && $extra['plugin-modifies-downloads'] === true;




            if ($isDownloadsModifyingPlugin || count(array_intersect($package->getNames(), $dlModifyingPluginRequires))) {


                $requires = array_filter(array_keys($package->getRequires()), function ($req) {

                    return !PlatformRepository::isPlatformPackage($req);
<?php             $isPlugin = $package->getType() === 'composer-plugin' || $package->getType() === 'composer-installer';




            if ($isPlugin || count(array_intersect($package->getNames(), $pluginRequires))) {


                $requires = array_filter(array_keys($package->getRequires()), function ($req) {

                    return !PlatformRepository::isPlatformPackage($req);
<?php         $relevantContent = array();



        foreach (array_intersect($relevantKeys, array_keys($content)) as $key) {

            $relevantContent[$key] = $content[$key];

        }

        if (isset($content['config']['platform'])) {
<?php                     $libxmlProvides = array_map(function ($extension) {

                        return $extension . '-libxml';

                    }, array_intersect($loadedExtensions, array('dom', 'simplexml', 'xml', 'xmlreader', 'xmlwriter')));

                    $this->addLibrary($name, $this->runtime->getConstant('LIBXML_DOTTED_VERSION'), 'libxml library version', array(), $libxmlProvides);



                    break;