In single quoted strings only the escape sequences \\
and \'
are recognized; any other occurrence of \
is interpreted as a plain character.
So since \M
and \U
are no valid escape sequences, they are interpreted as they are.
More Related Contents:
- Dollar ($) sign in password string treated as variable
- Escape string to use in mail()
- PHP quotes inside quotes
- Split a comma-delimited string into an array?
- startsWith() and endsWith() functions in PHP
- PHP – concatenate or directly insert variables in string
- Why does PHP consider 0 to be equal to a string?
- Replacing accented characters php
- Convert a comma-delimited string into array of integers?
- How to get everything after a certain character?
- Get first 100 characters from string, respecting full words
- PHP remove special character from string
- preg_replace: add number after backreference
- Iterate over each line in a string in PHP
- How to get int instead string from form?
- Print newline in PHP in single quotes
- PHP: How to sort the characters in a string?
- PHP sprintf escaping %
- Multi-line strings in PHP
- Why does PHP convert a string with the letter E into a number?
- Check if URL has certain string with PHP
- PHP: Split string into array, like explode with no delimiter
- What literal characters should be escaped in a regex?
- How to open file in PHP that has unicode characters in its name?
- how to extract links and titles from a .html page?
- Remove Trailing Slash From String PHP
- Pass a PHP variable to a JavaScript variable
- mysql_escape_string VS mysql_real_escape_string
- Measure string size in Bytes in php
- PHP: Escape RegEx pattern to prevent being applied?