Skip to content

Commit 4919e11

Browse files
committed
[Intl] Use cache in EmojiTransliterator::listIDs
1 parent 463c90e commit 4919e11

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Symfony/Component/Intl/Transliterator/EmojiTransliterator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,11 @@ public function getErrorMessage(): string|false
106106

107107
public static function listIDs(): array
108108
{
109-
static $ids;
109+
static $ids = [];
110110

111-
$ids = [];
111+
if ($ids) {
112+
return $ids;
113+
}
112114

113115
foreach (scandir(\dirname(__DIR__).'/Resources/data/transliterator/emoji/') as $file) {
114116
if (str_ends_with($file, '.php')) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy