1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/ext/intl/tests/bug62083.phpt
T
Máté Kocsis fd0b39905c Promote warnings to exceptions in ext/intl
Closes GH-5972
2020-09-07 19:46:55 +02:00

18 lines
450 B
PHP

--TEST--
Bug #62083: grapheme_extract() leaks memory
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--FILE--
<?php
$arr1 = array();
try {
grapheme_extract(-1, -1, -1,-1, $arr1);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
--EXPECT--
grapheme_extract(): Argument #3 ($extract_type) must be either GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS