From 7f95ea933b23202f5d80c3f4787f15fb97c14ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Magalh=C3=A3es?= Date: Fri, 20 Jan 2017 21:44:51 +0100 Subject: [PATCH 1/2] Binary string deprecation --- spec/09-lexical-structure.md | 12 ++++++------ spec/10-expressions.md | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/09-lexical-structure.md b/spec/09-lexical-structure.md index f06cbe7f..39557fa7 100644 --- a/spec/09-lexical-structure.md +++ b/spec/09-lexical-structure.md @@ -708,8 +708,8 @@ single-quotes (`'`, U+0027). The literal can contain any source character except single-quote (`'`) and backslash (`\\`), which can only be represented by their corresponding escape sequence. -The optional *b-prefix* is reserved for future use in dealing with -so-called *binary strings*. For now, a *single-quoted-string-literal* +*Deprecated* The optional *b-prefix* was reserved for future use in dealing with +so-called *binary strings*. A *single-quoted-string-literal* with a *b-prefix* is equivalent to one without. A single-quoted string literal is always a constant expression. @@ -812,8 +812,8 @@ double-quote (`"`) and backslash (`\\`), which can only be represented by their corresponding escape sequence. Certain other (and sometimes non-printable) characters can also be expressed as escape sequences. -The optional *b-prefix* is reserved for future use in dealing with -so-called *binary strings*. For now, a *double-quoted-string-literal* +*Deprecated* The optional *b-prefix* was reserved for future use in dealing with +so-called *binary strings*. A *double-quoted-string-literal* with a *b-prefix* is equivalent to one without. An escape sequence represents a single-character encoding, as described @@ -1040,7 +1040,7 @@ A heredoc literal supports variable substitution as defined for A heredoc string literal is a constant expression if it does not contain any variable substitution. -The optional *b-prefix* has no effect. +*Deprecated* The optional *b-prefix* has no effect. **Examples** @@ -1085,7 +1085,7 @@ not subject to variable substitution (like the single-quoted string). A nowdoc string literal is a constant expression. -The optional *b-prefix* has no effect. +*Deprecated* The optional *b-prefix* has no effect. **Examples** diff --git a/spec/10-expressions.md b/spec/10-expressions.md index e90b47ec..fecd40a0 100644 --- a/spec/10-expressions.md +++ b/spec/10-expressions.md @@ -2192,8 +2192,8 @@ A cast can result in a loss of information. A *cast-type* of `array` results in a [conversion to type array](08-conversions.md#converting-to-array-type). -A *cast-type* of `binary` is reserved for future use in dealing with -so-called *binary strings*. For now, it is fully equivalent to `string` cast. +*Deprecated* A *cast-type* of `binary` was reserved for future use in dealing with +so-called *binary strings*. It is fully equivalent to `string` cast. A *cast-type* of `bool` or `boolean` results in a [conversion to type `bool`](08-conversions.md#converting-to-boolean-type). From 4bd600337a8f39d11236d8c282d946202e14ce8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Magalh=C3=A3es?= Date: Sun, 11 Dec 2016 21:22:19 +0100 Subject: [PATCH 2/2] Remove binary casts from the tests --- tests/expressions/unary_operators/cast.phpt | Bin 9165 -> 8873 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/expressions/unary_operators/cast.phpt b/tests/expressions/unary_operators/cast.phpt index d87341e5de1e64f13f9388d218f49b0fb33f499b..dc0d75ad1a403001f1c656b18d6d7e9f1c2d1315 100644 GIT binary patch delta 48 zcmX@>zS4C=8q?-|OkJFlxACmmJb~AbpUK2*^8=YiMj$=;fsD-NdbtbCjE0*7lzbTh D(m)YQ delta 307 zcmZ4Kde(hI8WX!lQf6LaQRQStCQ&U2Q&UMv)0!(aIU`@8EU_p)r8Kud1FA|>DKRNI zB{fZHa|qKM&Kxe4;*uf-TLmS@M5iP}BV!fSI3;T?6`(P}U~!l(kTPp7xM5HQKueI+ zCZQUFp?LB;?sd9Ab29VNH4HTslnj)(pgaR056&?Ia$s(p&EwC{WNI)uUsh%_hfFFX fki9uy_6;+m>E;+kUq%C%X&?iTd;l}o5M3MqmPlLX