Display the drop-down list

Test of htmlspecialchars()

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
=> '<a href=\'test\'>Test</a>',
  
=> 'ENT_QUOTES',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '&lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> '_DOUBLE_QUOTES_\'à\' is not \'a\'_DOUBLE_QUOTES_',
  
=> 'ENT_QUOTES',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '&#039;à&#039; is not &#039;a&#039;',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> '_DOUBLE_QUOTES_\'\\xe0\' is not \'a\'_DOUBLE_QUOTES_',
  
=> 'ENT_QUOTES',
  
=> 'ISO-8859-1',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '&#039;&#039; is not &#039;a&#039;',
    
'utf8' => '&#039;à&#039; is not &#039;a&#039;',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]