public function decode($value, int $flags = null)
    {
        if (is_array($value) || is_object($value)) {
            foreach ($value as $_key => &$_value) {
                $_value = $this->decode($_value, $flags);
            } // unset($_key, $_value);
            return $value;
        }
        if (!($string = (string) $value)) {
            return $string; // Nothing to do.
        }
        if (!isset($flags)) {
            $flags = ENT_HTML5 | ENT_QUOTES;
        }
        return html_entity_decode($string, $flags, 'UTF-8');
    }
public function decode($value, int $flags = null)
    {
        if (is_array($value) || is_object($value)) {
            foreach ($value as $_key => &$_value) {
                $_value = $this->decode($_value, $flags);
            } // unset($_key, $_value);
            return $value;
        }
        if (!($string = (string) $value)) {
            return $string; // Nothing to do.
        }
        if (!isset($flags)) {
            $flags = ENT_HTML5 | ENT_QUOTES;
        }
        return html_entity_decode($string, $flags, 'UTF-8');
    }
public function decode ( $ value , int $ flags = null ) { if ( is_array ( $ value ) || is_object ( $ value ) ) { foreach ( $ value as $ _key => & $ _value ) { $ _value = $ this -> decode ( $ _value , $ flags ) ; } // unset($_key, $_value); return $ value ; } if ( ! ( $ string = ( string ) $ value ) ) { return $ string ; // Nothing to do. } if ( ! isset ( $ flags ) ) { $ flags = ENT_HTML5 | ENT_QUOTES ; } return html_entity_decode ( $ string , $ flags , 'UTF-8' ) ; }
Unescape HTML markup deeply.

@since 150424 Initial release.

@param mixed $value Any input value.
@param int   $flags Optional. Defaults to `ENT_HTML5 | ENT_QUOTES`.

@return string|array|object Value after having been unescaped deeply.
Unescape HTML markup deeply .