PHP - Character escape sequences and numeric notations in PHP

If you use PHP this is interesting:


Many modern programming languages support various way to use various characters such as simple English Latin characters, numbers, symbols, Emojis, and various special characters such as a new line or a tab character.

Most of the characters can be simply typed from a keyboard, and used in a PHP snippet as-is. For example, $string = "" is a completely valid string in PHP, and $num = 42 is a completely valid number. It is also possible to use multi-byte characters (i.e. characters that require more than one byte to store), and are completely valid: $emoji = "😻".

PHP, among many other programming languages, support several character escaping sequences to use various characters that cannot be typed from a standard keyboard, cannot be represented in a text form (such as invisible characters, or various control characters), or otherwise not readable. These characters use character escaping sequences that PHP recognizes.

For numbers, PHP supports the standard decimal numbers, but it is also possible to use other notations such as binary, octal, hexadecimal, and even scientific notation. They can make the code more readable and clearer depending in various contexts.