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