Function __global->get_html_translation_table

Definitions

sources_custom/phpstub.php

  • Returns the translation table used by htmlspecialchars and htmlentities.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table integer No No required parameter N/A N/A The table to select (HTML_ENTITIES or HTML_SPECIALCHARS)
$quote_style integer No No 2 N/A N/A The quote style (ENT_QUOTES or ENT_NOQUOTES or ENT_COMPAT)
$charset string No No utf-8 N/A N/A The character set to use

Returns

  • The translation table
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Returns the translation table used by htmlspecialchars and htmlentities.
 *
 * @param  integer $table The table to select (HTML_ENTITIES or HTML_SPECIALCHARS)
 * @param  integer $quote_style The quote style (ENT_QUOTES or ENT_NOQUOTES or ENT_COMPAT)
 * @param  string $charset The character set to use
 * @return array The translation table
 */

function get_html_translation_table(int $table, int $quote_style = 2, string $charset = 'utf-8') : array