You are here

public static function CharacterReference::lookupDecimal in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/masterminds/html5/src/HTML5/Parser/CharacterReference.php \Masterminds\HTML5\Parser\CharacterReference::lookupDecimal()

Given a decimal number, return the UTF-8 character.

3 calls to CharacterReference::lookupDecimal()
CharacterReference::lookupHex in vendor/masterminds/html5/src/HTML5/Parser/CharacterReference.php
Given a hexidecimal number, return the UTF-8 character.
CharacterReferenceTest::testLookupDecimal in vendor/masterminds/html5/test/HTML5/Parser/CharacterReferenceTest.php
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 48

Class

CharacterReference
Manage entity references.

Namespace

Masterminds\HTML5\Parser

Code

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');
}