- var_dump: documentation ( source)
- htmlspecialchars_decode: documentation ( source)
- htmlspecialchars: documentation ( source)
<?php
$x = "Umläüts & test!";
$x = htmlspecialchars($x);
function htmlDecode( &$subject )
{
$subject = (string) $subject;
do {
$oldSubject = $subject;
$subject = htmlspecialchars_decode($subject);
} while( $subject != $oldSubject );
}
$x = htmlspecialchars($x);
var_dump($x);
htmlDecode($x);
var_dump($x);