facebook/hhvm — pull request #1423 by bdurette (2013-12-23 05:38:42+00:00)
Title: Zend compatibility - stripslashes

Zend's implementation of `stripslashes` removes a trailing backslash in a string, except in the empty string it is replaced by a NUL. Prior to this PR, HHVM's implementation replaced the trailing backslash with a NUL. The reason is, HHVM unconditionally appended the character following a backslash. When the string ended in backslash, the following character was the null-terminator of the underlying c-string.

This was identified because of a failing test in the WordPress test suite.