1--TEST--
2transliterator_transliterate (variant 1, non-transliterator 1st arg)
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7ini_set("intl.error_level", E_WARNING);
8//exec('pause');
9$str = " o";
10echo transliterator_transliterate("[\p{White_Space}] hex", $str), "\n";
11
12echo transliterator_transliterate("\x8F", $str), "\n";
13echo intl_get_error_message(), "\n";
14
15class A {
16function __toString() { return "inexistent id"; }
17}
18
19echo transliterator_transliterate(new A(), $str), "\n";
20echo intl_get_error_message(), "\n";
21
22echo "Done.\n";
23?>
24--EXPECTF--
25\u0020o
26
27Warning: transliterator_transliterate(): String conversion of id to UTF-16 failed in %s on line %d
28
29Warning: transliterator_transliterate(): Could not create transliterator with ID %s
30
31String conversion of id to UTF-16 failed: U_INVALID_CHAR_FOUND
32
33Warning: transliterator_transliterate(): transliterator_create: unable to open ICU transliterator with id "inexistent id" in %s on line %d
34
35Warning: transliterator_transliterate(): Could not create transliterator with ID "inexistent id" (transliterator_create: unable to open ICU transliterator with id "inexistent id": U_INVALID_ID) in %s on line %d
36
37transliterator_create: unable to open ICU transliterator with id "inexistent id": U_INVALID_ID
38Done.
39