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--EXPECTF--
19Warning: Transliterator::transliterate(): String conversion of string to UTF-16 failed in %s on line %d
20bool(false)
21String conversion of string to UTF-16 failed: U_INVALID_CHAR_FOUND
22String conversion of string to UTF-16 failed: U_INVALID_CHAR_FOUND
23string(0) ""
24U_ZERO_ERROR
25Done.
26