<?php mb_encode_numericentity( string $string, array $map, ?string $encoding = null, bool $hex = false): string
<?php $this->text = preg_replace('/&(#(?:x[a-fA-F0-9]+|[0-9]+);)/', '&\1', $this->text); $this->text = mb_encode_numericentity($this->text, array(0x0080, 0xffff, 0, 0xffff), 'UTF-8'); $box = imagettfbbox($this->getPointSize(), 0, $this->file, $this->text);