- PHP strings can be composed of ASCII encoded characters that each take up one byte of memory. ASCII is a character encoding system that is capable of representing 128 different characters (or 256 different characters with the extended set). Among these characters are the Latin alphabet, the numbers zero through nine, and various symbols. While adequate for English language PHP scripts, ASCII does not provide characters found in non-Latin alphabets.
- PHP strings can be encoded to support Unicode characters. Unicode is a multi-byte character encoding system. Unicode provides support for every character from every alphabet, modern and ancient.
- PHP can convert certain special characters into HTML entities that are used commonly in web development. These characters have special significance in HTML and are likely to be used often by web developers. By including HTML special characters, PHP streamlines certain aspects of web development.
- PHP strings make use of special characters known as escape sequences. Escape sequences are used to print characters and symbols that the PHP language uses in its syntax. For example, a string is demarcated by double quotes. To actually print double quotes, and not prematurely close a string, an escape sequence must be used. For double quotes, the escape character is /".
previous post