rfc:binary_string_deprecation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:binary_string_deprecation [2016/12/11 18:12] pmmagarfc:binary_string_deprecation [2017/01/19 19:40] – Discussion preparation pmmaga
Line 1: Line 1:
 ====== PHP RFC: Binary String Deprecation ====== ====== PHP RFC: Binary String Deprecation ======
-  * Version: 0.1+  * Version: 0.2
   * Date: 2016-12-11   * Date: 2016-12-11
   * Author: Pedro Magalhães, mail@pmmaga.net   * Author: Pedro Magalhães, mail@pmmaga.net
-  * Status: Draft+  * Status: Under Discussion
   * First Published at: http://wiki.php.net/rfc/binary_string_deprecation   * First Published at: http://wiki.php.net/rfc/binary_string_deprecation
  
 ===== Introduction ===== ===== Introduction =====
-In version 5.2.1, the ''b'' prefix and the ''(binary)'' cast were [[http://php.net/manual/en/language.types.type-juggling.php|introduced for forward compatibility]] with the PHP-6 project. As it is known, that project never came to be. However, these are still accepted by the language scanner although ignored from then on+In version 5.2.1, the ''b'' prefix and the ''(binary)'' cast were [[http://php.net/manual/en/language.types.type-juggling.php|introduced for forward compatibility]] with the PHP-6 project. However, that project never came to be and no one can tell if that will be the approach chosen on a possible future attempt at implementing binary strings. However, these are still accepted by the language scanner although ignored from then on.
- +
-This RFC aims at deprecating the prefix as it produces no effect on the string literal and the binary cast because it is the same as casting to string.+
  
 ===== Proposal ===== ===== Proposal =====
 +This RFC aims to deprecate the prefix as it produces no effect on the string literal and the binary cast because it is the same as casting to string.
 +
 The proposed implementation consists in throwing a ''E_DEPRECATED'' during compilation when the prefix or the cast are used. At a later major version of PHP, the support for these should be removed. The proposed implementation consists in throwing a ''E_DEPRECATED'' during compilation when the prefix or the cast are used. At a later major version of PHP, the support for these should be removed.
  
Line 58: Line 58:
 ===== Patches and Tests ===== ===== Patches and Tests =====
 This RFC is implemented by the following patches: This RFC is implemented by the following patches:
-  * Implementation: [[https://github.com/php/php-src/compare/master...pmmaga:binary-string-deprecation]] +  * Implementation: [[https://github.com/php/php-src/pull/2322]] 
-  * Language Specification: In progress+  * Language Specification: [[https://github.com/php/php-langspec/pull/188]]
   * Documentation: [[https://edit.php.net/?patch=en/language/types/type-juggling.xml&project=PHP]]   * Documentation: [[https://edit.php.net/?patch=en/language/types/type-juggling.xml&project=PHP]]
  
rfc/binary_string_deprecation.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1