mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

* ext/intl: Small extension cleanup * ext/intl: Normalize cloning error handling behaviour Always throw a Error exception as we cannot progress from here * ext/intl: idn.c use ValueErrors where appropriate Drive-by refactoring * ext/intl: Remove some unused headers Probably more cleanup can be done
21 lines
323 B
PHP
21 lines
323 B
PHP
--TEST--
|
|
intl_get_error_code()
|
|
--EXTENSIONS--
|
|
intl
|
|
--FILE--
|
|
<?php
|
|
/*
|
|
* Check getting global error code.
|
|
*/
|
|
|
|
if( collator_get_locale(new Collator('en_US'), -1) !== false )
|
|
echo "failed\n";
|
|
else
|
|
{
|
|
$check_code = ( intl_get_error_code() != 0 );
|
|
echo ( $check_code ? "ok" : "failed" ) . "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
ok
|