[PHP 4, PHP 5, PHP 7, PHP 8]
addslashes — Quote string with slashes
Description
addslashes[string $string]: string
- single quote [']
- double quote ["]
- backslash [\]
- NUL [the NUL byte]
A use case of addslashes[] is escaping the aforementioned characters in a string that is to be evaluated by PHP:
if you need to quote SQL strings it's