Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if a value exists in an array
<?php in_array(mixed $needle, array $haystack, bool $strict = false): bool
<?php     protected function hasTab(string $tab): bool

    {

        return in_array($tab, $this->tabs);

    }



    protected function filterContextItems(array $contextItems): array
<?php         return Collection::make($contextItems)

            ->reject(function ($value, $group) use ($predefinedContextItemGroups) {

                return in_array($group, $predefinedContextItemGroups);

            })

            ->keys()

            ->toArray();
<?php             $this->info("❌ The default logging channel `{$defaultLogChannel}` is not configured in the `logging` config file");

        }



        if (! isset($activeStack['channels']) || ! in_array('flare', $activeStack['channels'])) {

            $this->info("❌ The logging channel `{$defaultLogChannel}` does not contain the 'flare' channel");

        }
<?php             return new CliDumper();

        }



        if (in_array(PHP_SAPI, ['cli', 'phpdbg']) && ! isset($_SERVER['LARAVEL_OCTANE'])) {

            return new CliDumper() ;

        }
<?php     public function setMinimumReportLogLevel(int $level)

    {

        if (! in_array($level, Logger::getLevels())) {

            throw new \InvalidArgumentException('The given minimum log level is not supported.');

        }
<?php             return false;

        }



        if (! in_array(env('DB_DATABASE'), ['homestead', 'laravel'])) {

            return false;

        }
<?php         $providedSolutions = $this->solutionProviders

            ->filter(function (string $solutionClass) {

                if (! in_array(HasSolutionsForThrowable::class, class_implements($solutionClass))) {

                    return false;

                }
<?php                     return false;

                }



                if (in_array($solutionClass, config('ignition.ignored_solution_providers', []))) {

                    return false;

                }
<?php             return null;

        }



        if (! in_array(Solution::class, class_implements($solutionClass))) {

            return null;

        }