xref: /PHP-8.2/ext/mbstring/tests/bug76532.phpt (revision 4083600b)
1--TEST--
2Bug #76532 (Integer overflow and excessive memory usage in mb_strimwidth)
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7$string_to_trim = '得很幸福。有一天,一个长得很丑的老人带着一只木马来到王';
8$width = 2147483647;
9var_dump(mb_strimwidth($string_to_trim, 0, $width));
10?>
11--EXPECT--
12string(81) "得很幸福。有一天,一个长得很丑的老人带着一只木马来到王"
13