rfc:autovivification_false
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:autovivification_false [2021/06/05 19:36] – Move sentence dharman | rfc:autovivification_false [2021/07/20 16:42] (current) – Implemented dharman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Deprecate autovivification on false and/or null ====== | + | ====== PHP RFC: Deprecate autovivification on false ====== |
* Date: 2021-05-25 | * Date: 2021-05-25 | ||
* Author: Kamil Tekiela < | * Author: Kamil Tekiela < | ||
- | * Status: | + | * Status: |
- | * Target Version: PHP 8.1 | + | * Implementation: https:// |
===== Introduction ===== | ===== Introduction ===== | ||
Line 21: | Line 21: | ||
</ | </ | ||
- | This RFC talks **only about autovivification from %%false%% and %%null%%**. | + | This RFC talks **only about autovivification from %%false%%**. |
===== Proposal ===== | ===== Proposal ===== | ||
- | The proposal is to disallow autovivification from %%false%% values | + | The proposal is to disallow autovivification from %%false%% values. We will continue to allow autovivification from undefined variable |
> Cannot use a scalar value as an array | > Cannot use a scalar value as an array | ||
- | In PHP 8.1, appending to a variable of type false will throw a deprecation | + | In PHP 8.1, appending to a variable of type false will display |
- | In PHP 9.0, this will throw a fatal error. | + | > Deprecated: Automatic conversion of false to array is deprecated in |
- | A secondary vote will decide if autovivification should be forbidden from %%null%% values too. | + | In PHP 9.0, this will throw a fatal error, the same as for other scalar types. |
===== Rationale ===== | ===== Rationale ===== | ||
Line 52: | Line 52: | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | Every single usage autovivification on false and/or null will throw a deprecation error in PHP 8.1 and throw a fatal error in PHP 9.0. | + | Every single usage autovivification on false will throw a deprecation error in PHP 8.1 and throw a fatal error in PHP 9.0. |
===== Vote ===== | ===== Vote ===== | ||
Should we deprecate autovivification from false? | Should we deprecate autovivification from false? | ||
+ | |||
+ | Started: 2021-06-09T20: | ||
+ | Ends: 2021-06-23T20: | ||
<doodle title=" | <doodle title=" | ||
Line 63: | Line 66: | ||
</ | </ | ||
- | \\ | + | ===== Discussion on internals ====== |
- | Should we deprecate autovivification from null? | + | |
+ | https:// | ||
- | <doodle title=" | ||
- | * Yes | ||
- | * No | ||
- | </ |
rfc/autovivification_false.1622921800.txt.gz · Last modified: 2021/06/05 19:36 by dharman