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 #43927 (koi8r is missing from html_entity_decode()) --FILE-- <?php var_dump(h..

Decoded Output download

--TEST--
Bug #43927 (koi8r is missing from html_entity_decode())
--FILE--
<?php
var_dump(html_entity_decode("&amp;lt;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;lt;", ENT_COMPAT, 'koi8-r'));
?>
--EXPECT--
string(4) "&lt;"
string(5) "&#38;"
string(8) "&#38;lt;"

Did this file decode correctly?

Original Code

--TEST--
Bug #43927 (koi8r is missing from html_entity_decode())
--FILE--
<?php
var_dump(html_entity_decode("&amp;lt;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;lt;", ENT_COMPAT, 'koi8-r'));
?>
--EXPECT--
string(4) "&lt;"
string(5) "&#38;"
string(8) "&#38;lt;"

Function Calls

None

Variables

None

Stats

MD5 52f454f0666d2750fbabd0100f1a2e62
Eval Count 0
Decode Time 80 ms