array_filter

Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Filters elements of an array using a callback function
<?php array_filter(array $array, ?callable $callback = null, int $mode = 0): array
<?php     protected function downloadRoadRunnerBinary()

    {

        tap(new Process(array_filter([

            (new PhpExecutableFinder)->find(),

            './vendor/bin/rr',

            'get-binary',

            '-n',

            '--ansi',

        ]), base_path(), null, null, null))->mustRun(

            fn ($type, $buffer) => $this->output->write($buffer)

        );
<?php         $this->forgetEnvironmentVariables();



        $server = tap(new Process(array_filter([

            $roadRunnerBinary,

            '-c', $this->configPath(),

            '-o', 'http.address='.$this->option('host').':'.$this->option('port'),

            '-o', 'server.command='.(new PhpExecutableFinder)->find().' ./vendor/bin/roadrunner-worker',

            '-o', 'http.pool.num_workers='.$this->workerCount(),

            '-o', 'http.pool.max_jobs='.$this->option('max-requests'),

            '-o', 'rpc.listen=tcp://'.$this->option('host').':'.$this->rpcPort(),

            '-o', 'http.pool.supervisor.exec_ttl='.$this->maxExecutionTime(),

            '-o', 'http.static.dir=public',

            '-o', 'http.middleware='.config('octane.roadrunner.http_middleware', 'static'),

            '-o', 'logs.mode=production',

            '-o', app()->environment('local') ? 'logs.level=debug' : 'logs.level=warning',

            '-o', 'logs.output=stdout',

            '-o', 'logs.encoding=json',

            'serve',

        ]), base_path(), [

            'APP_ENV' => app()->environment(),

            'APP_BASE_PATH' => base_path(),

            'LARAVEL_OCTANE' => 1,
<?php         $dispatcher = $this->app[Dispatcher::class];



        foreach ($this->app['config']->get('octane.listeners', []) as $event => $listeners) {

            foreach (array_filter(array_unique($listeners)) as $listener) {

                $dispatcher->listen($event, $listener);

            }

        }