1--TEST--
2Test mb_decode_mimeheader() function : variation
3--SKIPIF--
4<?php
5extension_loaded('mbstring') or die('skip');
6function_exists('mb_decode_mimeheader') or die("skip mb_decode_mimeheader() is not available in this build");
7?>
8--FILE--
9<?php
10/* Prototype  : string mb_decode_mimeheader(string string)
11 * Description: Decodes the MIME "encoded-word" in the string
12 * Source code: ext/mbstring/mbstring.c
13 * Alias to functions:
14 */
15
16echo "*** Testing mb_decode_mimeheader() : variation ***\n";
17mb_internal_encoding('iso-8859-7');
18
19//greek in UTF-8 to be converted to iso-8859-7
20$encoded_word = "=?UTF-8?B?zrHOss6zzrTOtc62zrfOuM65zrrOu868zr3Ovs6/z4DPgc+Dz4TPhc+Gz4fPiM+J?=";
21var_dump(bin2hex(mb_decode_mimeheader($encoded_word)));
22
23
24?>
25===DONE===
26--EXPECT--
27*** Testing mb_decode_mimeheader() : variation ***
28string(48) "e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f3f4f5f6f7f8f9"
29===DONE===
30