1--TEST--
2Transliterator::getErrorMessage (basic)
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5--FILE--
6<?php
7ini_set("intl.error_level", E_WARNING);
8$t = Transliterator::create("[\p{Bidi_Mirrored}] Hex");
9var_dump($t->transliterate("\x8F"));
10echo transliterator_get_error_message($t), "\n";
11
12echo $t->getErrorMessage(), "\n";
13
14var_dump($t->transliterate(""));
15echo $t->getErrorMessage(), "\n";
16
17echo "Done.\n";
18?>
19--EXPECTF--
20Warning: Transliterator::transliterate(): String conversion of string to UTF-16 failed in %s on line %d
21bool(false)
22String conversion of string to UTF-16 failed: U_INVALID_CHAR_FOUND
23String conversion of string to UTF-16 failed: U_INVALID_CHAR_FOUND
24string(0) ""
25U_ZERO_ERROR
26Done.
27