Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Applies the callback to the elements of the given arrays
<?php array_map(?callable $callback, array $array, array ...$arrays): array
<?php             'class' => 'twemoji',

        ], $attributes);



        $attrs = implode(' ', array_map(

            fn (string $key, string $value): string => "{$key}=\"{$value}\"",

            array_keys($attributes),

            array_values($attributes)

        ));



        return $this->replace('<img src="%{src}" alt="%{alt}" '.$attrs.' />', $alt);

    }
<?php     {

        $chars = preg_split('//u', $emoji, null, PREG_SPLIT_NO_EMPTY);



        $codepoints = array_map(

            fn (string $code): string => dechex(mb_ord($code)),

            $chars

        );



        $normalized = array_diff($codepoints, ['fe0f']);