php-src/ext/intl/tests/intl_get_error_code.phpt
Gina Peter Banyard 33f1cf202e
ext/intl: Various refactoring (#14360)
* 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
2024-05-30 12:51:36 +01:00

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