xref: /php-src/ext/intl/tests/gh11658.phpt (revision a579fa80)
1--TEST--
2GitHub #11658 MessageFormatter::format() leaks memory
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7
8ini_set("intl.error_level", E_WARNING);
9
10$s = MessageFormatter::formatMessage('en', 'some {wrong.format}', []);
11var_dump($s);
12
13$s = msgfmt_format_message('en', 'some {wrong.format}', []);
14var_dump($s);
15?>
16--EXPECTF--
17Warning: MessageFormatter::formatMessage(): pattern syntax error (parse error at offset 6, after "some {", before or at "wrong.format}") in %s on line %d
18bool(false)
19
20Warning: msgfmt_format_message(): pattern syntax error (parse error at offset 6, after "some {", before or at "wrong.format}") in %s on line %d
21bool(false)
22