Sometimes, special characters inside a string may need to be escaped. For instance, if you want to include a literal single quote within a single-quoted string, you should escape it with a backslash.
I ran into this bug while playing with query params. My script had declare(strict_types=1) and was iterating keys from $_GET using a function with the typed argument ...