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         }



        $isoDate = $this->extractDate($context, 'c');

        $tags = array_filter([

            'controller' => $controller ?? null,

            'project dir' => $projectDir ?? null,

        ]);



        $output->writeln(<<<HTML

<article data-dedup-id="$dedupIdentifier">
<?php         foreach ($this->contextProviders as $name => $provider) {

            $context[$name] = $provider->getContext();

        }

        $context = array_filter($context);

        $encodedPayload = base64_encode(serialize([$data, $context]))."\n";



        set_error_handler([self::class, 'nullErrorHandler']);