preg_replace
Intervention/image
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Perform a regular expression search and replace
preg_replace
(
string
|array
$pattern
,
string
|array
$replacement
,
string
|array
$subject
,
int $limit
= -
1
,
int
&
$count
=
null
):
string
|array|
null
$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'
);
src/Intervention/Image/Gd/Font.php