1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/intl/tests/msgfmt_format_error3.phpt
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00

21 lines
462 B
PHP

--TEST--
MessageFormatter::format() given negative arg key
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--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)