Repo Added
|
Files
173
|
Badge
Embed ▾
README BADGES
|
travis-ci
:sparkles: PHP 7.0: new NewUnicodeEscapeSequence sniff > ### Unicode codepoint escape syntax > > This takes a Unicode codepoint in hexadecimal form, and outputs that codepoint in UTF-8 to a double-quoted string or a heredoc. Any valid codepoint is accepted, with leading 0's being optional. > ```php > echo "\u{aa}"; > echo "\u{0000aa}"; > echo "\u{9999}"; > ``` > ### `\u{` may cause errors ¶ > > Due to the addition of the new Unicode codepoint escape syntax, strings containing a literal `\u{` followed by an invalid sequence will cause a fatal error. To avoid this, the leading backslash should be escaped. Refs: * https://wiki.php.net/rfc/unicode_escape * https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.unicode-codepoint-escape-syntax * https://www.php.net/manual/en/migration70.incompatible.php#migration70.incompatible.strings.unicode-escapes * https://github.com/php/php-src/commit/bae46f307 Includes unit tests.
45 of 45 new or added lines in 1 file covered. (100.0%)
3947 of 4205 relevant lines covered (93.86%)
33.62 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|