Escape Character¶
Escape characters are special characters, that introduce a special meaning, for example when redacting an escape sequence.
Escape characters are often generating a special sequence to escape themselves and allow their literal meaning to be expressed.
In strings and HEREDOC, the escape character is the backslash: \.
<?php
echo '<a href="https://www.exakat.io/" />';
// This prevents the variable $x to be interpolated
echo <<<HEREDOC
echo $x;
HEREDOC;
?>
See also String literals (MySQL).
Related : Heredocs, Injection, Regular Expression, Security, Structured Query Language (SQL), String, Cross Site Scripting (XSS), Backslash , Escape Data, Slash /