1--TEST--
2intl_get_error_code()
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7/*
8 * Check getting global error code.
9 */
10
11if( collator_get_locale(new Collator('en_US'), -1) !== false )
12    echo "failed\n";
13else
14{
15    $check_code = ( intl_get_error_code() != 0 );
16    echo ( $check_code ?  "ok" : "failed" ) . "\n";
17}
18
19?>
20--EXPECT--
21ok
22