htmlentities
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Convert all applicable characters to HTML entities
htmlentities
(
string $string
,
int $flags
=
ENT_QUOTES
|
ENT_SUBSTITUTE
|
ENT_HTML401
,
?
string $encoding
=
null
,
bool $double_encode
=
true
):
string
laravel/framework
public function
cleanRateLimiterKey
(
$key
)
{
return
preg_replace
(
'/&([a-z])[a-z]+;/i'
,
'$1'
,
htmlentities
(
$key
));
}
}
src/Illuminate/Cache/RateLimiter.php
statamic/cms
public static function
entities
(
$value
)
{
return
htmlentities
(
$value
,
ENT_QUOTES
,
Config
::
get
(
'statamic.system.charset'
,
'UTF-8'
),
false
);
}
src/Support/Html.php