xref: /php-src/ext/mbstring/tests/bug66797.phpt (revision 74859783)
1--TEST--
2Bug #66797 (mb_substr only takes 32-bit signed integer)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
8?>
9--FILE--
10<?php
11var_dump(
12    mb_substr('bar', 0, 0x7fffffff),
13    mb_substr('bar', 0, 0x80000000),
14    mb_substr('bar', 0xffffffff, 1),
15    mb_substr('bar', 0x100000000, 1)
16);
17?>
18--EXPECT--
19string(3) "bar"
20string(3) "bar"
21string(0) ""
22string(0) ""
23