facebook/hhvm — pull request #4014 by danslo (2014-10-19 19:10:12+00:00)
Title: backport PHP bugfix #43540

We need to properly set newlength.

See:
- https://github.com/php/php-src/commit/898ff10dc0f799ecf997cb3c64a96f2751884187
- https://bugs.php.net/bug.php?id=43540