<?php
$simbolos = array("’" => "apostrophe", "" => "apostrophe", "(" => "parentheses", ")" => "parentheses", "[" => "square brackets", "]" => "square brackets", "{" => "curly brackets", "}" => "curly brackets", ":" => "colon", "ː" => "ipa triangular colon", "," => "comma", "،" => "arabic comma", "–" => "en dash", "—" => "em dash", "‒" => "figure dash", "…" => "ellipsis", ". . ." => "ellipsis", "⋯" => "mid-line ellipsis", "!" => "exclamation mark", "¡" => "inverted exclamation mark", "՜" => "armenian exclamation mark", "ǃ" => "alveolar click sign", "." => "period", "-" => "hyphen-minus", "‑" => "non-breaking hyphen", "?" => "question mark", "“" => "quotation marks", "”" => "quotation marks", "’" => "quotation marks", "‘" => "quotation marks", "”" => "citation marks", "”" => "citation marks", "«" => "guillemets", "»" => "guillemets", "「" => "cjk brackets", "」" => "cjk brackets", ";" => "semicolon", "/" => "slash", "⁄" => "fraction slash", "∕" => "division slash", "•" => "interpunct", "&" => "ampersand", "*" => "asterisk", "\\" => "backslash", "•" => "bullet", "◦" => "white bullet", "‣" => "triangular bullet", "^" => "circumflex aceent", "‸" => "caret", "⁁" => "caret insertion point", "^" => "fullwidth circumflex accent", "†" => "dagger", "‡" => "double dagger", "°" => "degree", "″" => "ditto mark", "¿" => "inverted question mark", '#' => "number sign", "№" => "numero sign", "÷" => "obelus", "º" => "ordinal indicator", "ª" => "ordinal indicator", "%" => "percent", "‰" => "per mil", "+" => "plus", "−" => "minus", "‱" => "per ten thousand sign", "¶" => "pilcrow", "′" => "prime", "″" => "double prime", "‴" => "triple prime", "§" => "section sign", "~" => "tilde", "˜" => "tilde", "∼" => "tilde operator", "_" => "underscore", "|" => "vertical bar", "¦" => "broken bar", "‖" => "magnitude", "∣" => "divides", "©" => "copyright", "℗" => "sound-recording copyright", "®" => "registered trademark", "⁂" => "asterism", "❧" => "fleuron", "☞" => "index", "‽" => "interrobang", "◊" => "lozenge", "※" => "reference mark", "⁀" => "tie", "$" => "dollar sign"); $simbolo = "$";
foreach($simbolos as $chave => $valor) {
if (strpos($chave, $simbolo) === 0) { $simbolo = $valor;
} else {
// Fazer algo aqui caso não encontre
}
}
echo $simbolo . "\n";
PD9waHAKCiRzaW1ib2xvcyA9IGFycmF5KCLigJkiID0+ICJhcG9zdHJvcGhlIiwgIiIgPT4gImFwb3N0cm9waGUiLCAiKCIgPT4gInBhcmVudGhlc2VzIiwgIikiID0+ICJwYXJlbnRoZXNlcyIsICJbIiA9PiAic3F1YXJlIGJyYWNrZXRzIiwgIl0iID0+ICJzcXVhcmUgYnJhY2tldHMiLCAieyIgPT4gImN1cmx5IGJyYWNrZXRzIiwgIn0iID0+ICJjdXJseSBicmFja2V0cyIsICI6IiA9PiAiY29sb24iLCAiy5AiID0+ICJpcGEgdHJpYW5ndWxhciBjb2xvbiIsICIsIiA9PiAiY29tbWEiLCAi2IwiID0+ICJhcmFiaWMgY29tbWEiLCAi4oCTIiA9PiAiZW4gZGFzaCIsICLigJQiID0+ICJlbSBkYXNoIiwgIuKAkiIgPT4gImZpZ3VyZSBkYXNoIiwgIuKApiIgPT4gImVsbGlwc2lzIiwgIi4gLiAuIiA9PiAiZWxsaXBzaXMiLCAi4ouvIiA9PiAibWlkLWxpbmUgZWxsaXBzaXMiLCAiISIgPT4gImV4Y2xhbWF0aW9uIG1hcmsiLCAiwqEiID0+ICJpbnZlcnRlZCBleGNsYW1hdGlvbiBtYXJrIiwgItWcIiA9PiAiYXJtZW5pYW4gZXhjbGFtYXRpb24gbWFyayIsICLHgyIgPT4gImFsdmVvbGFyIGNsaWNrIHNpZ24iLCAiLiIgPT4gInBlcmlvZCIsICItIiA9PiAiaHlwaGVuLW1pbnVzIiwgIuKAkSIgPT4gIm5vbi1icmVha2luZyBoeXBoZW4iLCAiPyIgPT4gInF1ZXN0aW9uIG1hcmsiLCAi4oCcIiA9PiAicXVvdGF0aW9uIG1hcmtzIiwgIuKAnSIgPT4gInF1b3RhdGlvbiBtYXJrcyIsICLigJkiID0+ICJxdW90YXRpb24gbWFya3MiLCAi4oCYIiA9PiA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