1--TEST--
2Transliterator::getErrorCode (error)
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");
9echo transliterator_get_error_code(), "\n";
10echo $t->getErrorCode(null), "\n";
11echo transliterator_get_error_code(array()), "\n";
12--EXPECTF--
13Warning: transliterator_get_error_code() expects exactly 1 parameter, 0 given in %s on line %d
14
15Warning: transliterator_get_error_code(): transliterator_get_error_code: unable to parse input params in %s on line %d
16
17
18Warning: Transliterator::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
19
20Warning: Transliterator::getErrorCode(): transliterator_get_error_code: unable to parse input params in %s on line %d
21
22
23Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d
24Stack trace:
25#0 %s(%d): transliterator_get_error_code(Array)
26#1 {main}
27  thrown in %s on line %d
28