htmlspecialchars

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Convert special characters to HTML entities
<?php htmlspecialchars(    string $string,    int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401,    ?string $encoding = null,    bool $double_encode = true): string
<?php function esc(string $str)

{

    return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8');

}
<?php         $dumper->dump($data);

        $out = ob_get_clean();

        $out = preg_replace('/[ \t]+$/m', '', $out);

        $var['file'] = htmlspecialchars($var['file'], \ENT_QUOTES, 'UTF-8');

        $intMax = \PHP_INT_MAX;

        preg_match('/sf-dump-\d+/', $out, $dumpId);

        $dumpId = $dumpId[0];