: This article mainly introduces the php function stripslashes for handling multiple consecutive backslashes. if you are interested in PHP tutorials, refer to it. Php function: stripslashes ()
Remove the backlash. the string stripslashes (string $ str) function prototype returns a string (\ 'converted to' and so on) after the escape backlash is removed ).
On the official php website, return a string (\ 'converted to' and so on) after removing the escape backslash ). The double backslash (\) is converted to a single backslash (\). In fact, this is not accurate. I will test the result as follows:
In the case of multiple consecutive backlash, it cannot be ensured that there is no backslash in the returned characters after it is escaped, for example, if there are three consecutive backslashes, one will be retained ., After testing, the rule for this function to remove the backslash is: remove all two or two consecutive periods. if there are more than two, subtract 2 and divide it by 4. then, an integer is obtained, for example, after processing 7 consecutive backslashes, the number is ceil (7-2)/4) = 2, therefore, in actual use, we can replace more than three consecutive backslash values with three and then use this function. Note: This issue is not mentioned on the official php website.
This blog original, reproduced please specify the source: http://blog.csdn.net/u011474028
The above introduces the php function stripslashes for handling multiple consecutive backlash, including some content, hope to be helpful to friends who are interested in PHP tutorials.