1--TEST-- 2numfmt_get_error_message/code() 3--SKIPIF-- 4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> 5--FILE-- 6<?php 7 8/* 9 * Error handling. 10 */ 11 12 13function ut_main() 14{ 15 $fmt = ut_nfmt_create( "en_US", NumberFormatter::CURRENCY ); 16 $currency = ''; 17 $pos = 0; 18 $num = ut_nfmt_parse_currency( $fmt, '123.45', $currency, $pos ); 19 if( $num === false ) 20 return $fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ")\n"; 21 else 22 return "Ooops, an error should have occurred."; 23} 24 25include_once( 'ut_common.inc' ); 26 27// Run the test 28ut_run(); 29?> 30--EXPECT-- 31Number parsing failed: U_PARSE_ERROR (9) 32