Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Bug #61116 (HTML functions use encoding, not charset) --FILE-- <?php echo new Ref..
Decoded Output download
--TEST--
Bug #61116 (HTML functions use encoding, not charset)
--FILE--
<?php
echo new ReflectionFunction('htmlspecialchars'), "
";
echo new ReflectionFunction('get_html_translation_table'), "
";
?>
--EXPECT--
Function [ <internal:standard> function htmlspecialchars ] {
- Parameters [4] {
Parameter #0 [ <required> string $string ]
Parameter #1 [ <optional> int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ]
Parameter #2 [ <optional> ?string $encoding = null ]
Parameter #3 [ <optional> bool $double_encode = true ]
}
- Return [ string ]
}
Function [ <internal:standard> function get_html_translation_table ] {
- Parameters [3] {
Parameter #0 [ <optional> int $table = HTML_SPECIALCHARS ]
Parameter #1 [ <optional> int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ]
Parameter #2 [ <optional> string $encoding = "UTF-8" ]
}
- Return [ array ]
}
Did this file decode correctly?
Original Code
--TEST--
Bug #61116 (HTML functions use encoding, not charset)
--FILE--
<?php
echo new ReflectionFunction('htmlspecialchars'), "\n";
echo new ReflectionFunction('get_html_translation_table'), "\n";
?>
--EXPECT--
Function [ <internal:standard> function htmlspecialchars ] {
- Parameters [4] {
Parameter #0 [ <required> string $string ]
Parameter #1 [ <optional> int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ]
Parameter #2 [ <optional> ?string $encoding = null ]
Parameter #3 [ <optional> bool $double_encode = true ]
}
- Return [ string ]
}
Function [ <internal:standard> function get_html_translation_table ] {
- Parameters [3] {
Parameter #0 [ <optional> int $table = HTML_SPECIALCHARS ]
Parameter #1 [ <optional> int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ]
Parameter #2 [ <optional> string $encoding = "UTF-8" ]
}
- Return [ array ]
}
Function Calls
None |
Stats
MD5 | 1967d2d237636c65df933399a53ebab0 |
Eval Count | 0 |
Decode Time | 87 ms |