rfc:counting_non_countables
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:counting_non_countables [2016/10/04 09:40] – Added mailing list link duncan3dc | rfc:counting_non_countables [2016/10/17 20:47] – Remove the outstanding question about count(null) duncan3dc | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Counting of non-countable objects ====== | ====== PHP RFC: Counting of non-countable objects ====== | ||
- | * Version: 0.1 | + | * Version: 0.3 |
* Date: 2016-10-04 | * Date: 2016-10-04 | ||
* Author: Craig Duncan < | * Author: Craig Duncan < | ||
Line 9: | Line 9: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | Calling '' | + | Calling '' |
There are no known use cases for this, and it can easily hide bugs, take the following example: | There are no known use cases for this, and it can easily hide bugs, take the following example: | ||
<code php> | <code php> | ||
Line 27: | Line 27: | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | This RFC proposes | + | This RFC proposes |
+ | |||
+ | //Note that the sizeof alias is also affected.// http:// | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | Counting objects that don't implement the Countable interface will still work, so the only BC will be in cases where userland convert warnings to Exceptions. | + | None, deprecating features does not break BC. |
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== | ||
PHP 7.2 | PHP 7.2 | ||
- | |||
- | ===== Open Issues ===== | ||
- | |||
- | * Should we deprecate instead, and then disable in 8.0 | ||
- | * Does introducing a warning in a minor release qualify as breaking BC | ||
- | |||
- | ===== Unaffected PHP Functionality ===== | ||
- | |||
- | Counting scalars is unaffected and will still return '' | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
Line 53: | Line 46: | ||
Patch to handle the change: | Patch to handle the change: | ||
- | https:// | + | https:// |
- | Example | + | Example |
- | https:// | + | https:// |
=====References ===== | =====References ===== |
rfc/counting_non_countables.txt · Last modified: 2018/03/01 23:26 by carusogabriel