Function __global->escape_header

Definitions

sources/global3.php

  • Apply escaping for an HTTP header.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$str string No No required parameter N/A N/A Text to insert into header
$within_quotes boolean No No False N/A N/A Text is between quotes

Returns

  • Escaped text
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Apply escaping for an HTTP header.
 *
 * @param  string $str Text to insert into header
 * @param  boolean $within_quotes Text is between quotes
 * @return string Escaped text
 */

function escape_header(string $str, bool $within_quotes = false) : string