Function __global->escape_html

Definitions

sources/global3.php

  • Escape certain special characters in the provided string, so that it can be embedded as text within HTML.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$string string No No required parameter N/A N/A The input string

Returns

  • The escaped string
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Escape certain special characters in the provided string, so that it can be embedded as text within HTML.
 *
 * @param  string $string The input string
 * @return string The escaped string
 */

function escape_html(string $string) : string