1--TEST-- 2Transliterator::transliterate (error) 3--SKIPIF-- 4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> 5--FILE-- 6<?php 7 8ini_set("intl.error_level", E_WARNING); 9 10$tr = Transliterator::create("latin"); 11 12//Arguments 13var_dump(transliterator_transliterate()); 14var_dump(transliterator_transliterate($tr,array())); 15var_dump(transliterator_transliterate($tr,"str",7)); 16var_dump(transliterator_transliterate($tr,"str",7,6)); 17var_dump(transliterator_transliterate($tr,"str",2,-1,"extra")); 18 19//Arguments 20var_dump($tr->transliterate()); 21var_dump($tr->transliterate(array())); 22 23//bad UTF-8 24transliterator_transliterate($tr, "\x80\x03"); 25 26echo "Done.\n"; 27--EXPECTF-- 28Warning: transliterator_transliterate() expects at least 2 parameters, 0 given in %s on line %d 29 30Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d 31bool(false) 32 33Warning: transliterator_transliterate() expects parameter 2 to be string, array given in %s on line %d 34 35Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d 36bool(false) 37 38Warning: transliterator_transliterate(): transliterator_transliterate: Neither "start" nor the "end" arguments can exceed the number of UTF-16 code units (in this case, 3) in %s on line %d 39bool(false) 40 41Warning: transliterator_transliterate(): transliterator_transliterate: "start" argument should be non-negative and not bigger than "end" (if defined) in %s on line %d 42bool(false) 43 44Warning: transliterator_transliterate() expects at most 4 parameters, 5 given in %s on line %d 45 46Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d 47bool(false) 48 49Warning: Transliterator::transliterate() expects at least 1 parameter, 0 given in %s on line %d 50 51Warning: Transliterator::transliterate(): transliterator_transliterate: bad arguments in %s on line %d 52bool(false) 53 54Warning: Transliterator::transliterate() expects parameter 1 to be string, array given in %s on line %d 55 56Warning: Transliterator::transliterate(): transliterator_transliterate: bad arguments in %s on line %d 57bool(false) 58 59Warning: transliterator_transliterate(): String conversion of string to UTF-16 failed in %s on line %d 60Done. 61