1--TEST-- 2transliterator_transliterate (variant 1, non-transliterator 1st arg) 3--SKIPIF-- 4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> 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--EXPECTF-- 24\u0020o 25 26Warning: transliterator_transliterate(): String conversion of id to UTF-16 failed in %s on line %d 27 28Warning: transliterator_transliterate(): Could not create transliterator with ID %s 29 30String conversion of id to UTF-16 failed: U_INVALID_CHAR_FOUND 31 32Warning: transliterator_transliterate(): transliterator_create: unable to open ICU transliterator with id "inexistent id" in %s on line %d 33 34Warning: 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 35 36transliterator_create: unable to open ICU transliterator with id "inexistent id": U_INVALID_ID 37Done. 38