rfc:deprecate-boolean-string-coercion
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:deprecate-boolean-string-coercion [2021/06/22 22:05] – created girgias | rfc:deprecate-boolean-string-coercion [2021/06/25 13:05] (current) – Fix bullet list girgias | ||
---|---|---|---|
Line 17: | Line 17: | ||
Emit an '' | Emit an '' | ||
+ | |||
+ | The diagnostic message is: | ||
+ | > Implicit bool to string coercion is deprecated | ||
Raise this deprecation diagnostic to a TypeError in the next major version (PHP 9.0). | Raise this deprecation diagnostic to a TypeError in the next major version (PHP 9.0). | ||
+ | |||
+ | Amending the type signature of the following functions as their usage with a boolean argument | ||
+ | is common: | ||
+ | |||
+ | * < | ||
===== Rationale ===== | ===== Rationale ===== | ||
Line 31: | Line 39: | ||
* Concatenation operator '' | * Concatenation operator '' | ||
+ | * < | ||
+ | * < | ||
+ | * String interpolation | ||
* Assignment to a typed property of type '' | * Assignment to a typed property of type '' | ||
* Argument for a parameter of type '' | * Argument for a parameter of type '' | ||
Line 37: | Line 48: | ||
===== Proposed PHP Version ===== | ===== Proposed PHP Version ===== | ||
- | Deprecation: | + | Deprecation |
Promotion to TypeError: next major version, i.e. PHP 9.0. | Promotion to TypeError: next major version, i.e. PHP 9.0. | ||
Line 48: | Line 59: | ||
* Coercion from bool to int | * Coercion from bool to int | ||
* Coercion from bool to float | * Coercion from bool to float | ||
+ | * < | ||
===== Future scope ===== | ===== Future scope ===== |
rfc/deprecate-boolean-string-coercion.1624399558.txt.gz · Last modified: 2021/06/22 22:05 by girgias