Hi,

I'm wondering what you all have got out there. I know you have the following:

\t => tab
\n => new line

What do you have more? Anyone got a link to a webpage or a word that I could search for in google to get a list for all those "\" - possibilities. I don't how you name this.

Grtz

Dani AI

Generated

Good summary from — those are generally called "escape sequences" or "escaped characters." For searches, useful keywords are "escape sequences", "string escape sequences" and "PHP string escapes". Below are a few practical additions and PHP-specific notes that aren't in the list above.

Languages often add a few more control escapes (alert/bell, backspace, vertical-tab, form-feed, the ASCII escape control, etc.) and modern runtimes also support Unicode codepoint escapes. In PHP specifically: double-quoted strings and heredoc blocks interpret escapes and interpolate variables, while single-quoted strings and nowdoc blocks do not (they keep backslashes literal except when needed to escape the delimiter). PHP 7+ supports the Unicode codepoint escape syntax for inserting characters by codepoint.

<?php
// PHP 7+ codepoint escape
echo "\u{1F600}"; // Unicode codepoint (if the output supports UTF-8)

// nowdoc keeps backslashes and escapes literal
$text = <<<'RAW'
No parsing here: \a \u{1F600}
RAW;
?>

Troubleshooting tips: if an escape seems ignored, check the string type (single vs double vs nowdoc/heredoc), confirm the PHP version for Unicode escapes, and verify the output encoding (UTF-8 vs byte streams). Use var_dump or byte/character inspection (ord/mb_ord) to see actual bytes. Also remember regexes, shells, and JavaScript have their own escaping rules — what works in one place may be literal or different in another.

For the canonical reference and full table of PHP escape behaviors, see the PHP manual: PHP manual: strings.

Recommended Answers

All 2 Replies

those are Escaped Characters.

sequence meaning

\n linefeed (LF or 0x0A (10) in ASCII) 
\r carriage return (CR or 0x0D (13) in ASCII) 
\t horizontal tab (HT or 0x09 (9) in ASCII) 
\\ backslash 
\$ dollar sign 
\" double-quote 
\[0-7]{1,3} the sequence of characters matching the regular expression is a character in octal notation  
\x[0-9A-Fa-f]{1,2} the sequence of characters matching the regular expression is a character in hexadecimal notation

Thanks a lot mate, well explained!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.