php-src/ext/intl/tests/msgfmt_format_error3.phpt
Nikita Popov 7485978339
Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

18 lines
393 B
PHP

--TEST--
MessageFormatter::format() given negative arg key
--EXTENSIONS--
intl
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
$fmt = <<<EOD
{foo,number,percent}
EOD;
$mf = new MessageFormatter('en_US', $fmt);
var_dump($mf->format(array("foo" => 7, -1 => "bar")));
?>
--EXPECTF--
Warning: MessageFormatter::format(): Found negative or too large array key in %s on line %d
bool(false)