(<5.4) No string escape code for ESC (ascii 27), normally \e
As of PHP 5.4, the \e
escape sequence is available! The person that implemented the patch also cited this very sadness as his rationale for solving it!
In <5.4, PHP has no shorthand escape code for the Escape character; it is usually \e
.
See: php language.types.string#language.types.string.syntax.double
It does have octal (\033
) and hex (\x1b
) escape codes for it, but these become especially cumbersome when doing things like ANSI escape sequences to control the color of output in your terminal, where the clarity of the sequences is important and even a few extra characters increases the line noise significantly.
And yet, for some reason, they chose not to omit a shorthand for vertical tab (\v
), which unlike Escape is actually unused according to everything2, some guy, and a Perl RFC.
Significance: Missing Features
Language features make developers' lives easier. Often, language features are not complex for the language designers to implement (barring unnecessary complications in the internals), but can save developers hours of time. Missing language features are disrespectful to developers and encourage dirty hacks, "clever" solutions, and kludgy workarounds to achieve the desired functionality.