1--TEST--
2No overflow should occur during the memory_limit check for wordwrap()
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) != 'WIN' || PHP_INT_SIZE != 4) die("skip this test is for 32bit Windows platforms only");
6if (getenv("USE_ZEND_ALLOC") === "0") die("skip Zend MM disabled");
7?>
8--INI--
9memory_limit=128M
10--FILE--
11<?php
12
13$str = str_repeat('x', 65534);
14$str2 = str_repeat('x', 65535);
15wordwrap($str, 1, $str2);
16
17?>
18--EXPECTF--
19Fatal error: Possible integer overflow in memory allocation (4294901777 + %d) in %s on line %d
20