function CharacterReference::lookupDecimal
Given a decimal number, return the UTF-8 character.
Parameters
$int:
Return value
false|string|string[]|null
2 calls to CharacterReference::lookupDecimal()
- CharacterReference::lookupHex in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ CharacterReference.php - Given a hexidecimal number, return the UTF-8 character.
- Tokenizer::decodeCharacterReference in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Tokenizer.php - Decode a character reference and return the string.
File
-
vendor/
masterminds/ html5/ src/ HTML5/ Parser/ CharacterReference.php, line 41
Class
- CharacterReference
- Manage entity references.
Namespace
Masterminds\HTML5\ParserCode
public static function lookupDecimal($int) {
$entity = '&#' . $int . ';';
// UNTESTED: This may fail on some planes. Couldn't find full documentation
// on the value of the mask array.
return mb_decode_numericentity($entity, static::$numeric_mask, 'utf-8');
}