$x = '-- \' --';
print $x . "\n"; // -- ' --
$y = '-- \\\' --';
print $y . "\n"; // -- \' --
To specify a literal single quote, escape it with a backslash (\). To specify a literal backslash, double it (\\).https://www.php.net/manual/en/language.types.strin...