rfc:remove_php4_constructors
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
rfc:remove_php4_constructors [2015/02/06 16:55] levim Update implementation |
rfc:remove_php4_constructors [2015/02/23 04:25] levim Add comments in certain example |
||
---|---|---|---|
Line 50: | Line 50: | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | This RFC proposes that for PHP 7 we emit '' | + | PHP 7 will emit '' |
- | This RFC also proposes to stop emitting '' | + | PHP 7 will also stop emitting '' |
- | Some code samples in the [[# | + | Refer to the [[# |
==== Backward Incompatible Changes ==== | ==== Backward Incompatible Changes ==== | ||
Since an '' | Since an '' | ||
- | In PHP 8 recognition for old constructors will be outright removed, meaning that anything without a ''< | + | In PHP 8 recognition for old constructors will be outright removed, meaning that anything without a ''< |
==== Examples ==== | ==== Examples ==== | ||
Line 104: | Line 104: | ||
<PHP> | <PHP> | ||
- | class Filter { | + | class Filter { |
+ | // PHP 5: filter is a constructor | ||
+ | // PHP 7: filter is a constructor and E_DEPRECATED is raised | ||
+ | // PHP 8: filter is a normal method and is not a constructor; | ||
function filter() {} | function filter() {} | ||
} | } | ||
Line 123: | Line 126: | ||
===== Voting ===== | ===== Voting ===== | ||
- | This RFC targets PHP 7 and PHP 8. Please read the RFC to understand what is being proposed. Also note that anything proposed for PHP 8 would be subject to any future RFC as per our normal processes. | + | This RFC targets PHP 7 and PHP 8. Please read the RFC to understand what is being proposed. |
This RFC requires 2/3 vote in favor of deprecating and removing PHP 4 style constructors to pass. | This RFC requires 2/3 vote in favor of deprecating and removing PHP 4 style constructors to pass. |
rfc/remove_php4_constructors.txt · Last modified: 2017/09/22 13:28 (external edit)