wp-includes/SimplePie/library/SimplePie/Decode/HTML/Entities.php:16Decode HTML Entities
$datastringpublic$consumedstringpublic$positionintpublicclass SimplePie_Decode_HTML_Entities{ /** * Data to be parsed * * @access private * @var string */ public $data = ''; /** * Currently consumed bytes * * @access private * @var string */ public $consumed = ''; /** * Position of the current byte being parsed * * @access private * @var int */ public $position = 0; /** * Create an instance of the class with the input data * * @access public * @param string $data Input data */ public function __construct(string $data) { $this->data = $data; } /** * Parse the input data * * @access public * @return string Output data */ public function parse() { while (($position = strpos($this->data, '&', $this->position)) !== false) { $this->position = $position; $this->consume(); $this->entity(); $this->consumed = ''; } return $this->data; } /** * Consume the next byte * * @access private * @return string|false The next byte, or false, if there is no more data */ public function consume() { if (isset($this->data[$this->position])) { $this->consumed .= $this->data[$this->position]; return $this->data[$this->position++]; } return false; } /** * Consume a range of characters * * @access private * @param string $chars Characters to consume * @return string|false A series of characters that match the range, or false */ public function consume_range(string $chars) { if ($len = strspn($this->data, $chars, $this->position)) {Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/SimplePie/library/SimplePie/Decode/HTML/Entities.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.