rfc:deprecate_dollar_brace_string_interpolation
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:deprecate_dollar_brace_string_interpolation [2021/03/13 14:25] – Create RFC ilutov | rfc:deprecate_dollar_brace_string_interpolation [2021/03/13 14:30] – Adjust voting title ilutov | ||
---|---|---|---|
Line 20: | Line 20: | ||
===== Status quo ===== | ===== Status quo ===== | ||
- | ====== Options 1, 2 and 3 ====== | + | ==== Options 1, 2 and 3 ==== |
Options 1, 2 and 3 all roughty try to do they same thing: They embed a local variable in a string, sometimes allowing to call a method or access an array offset on that variable. All of these examples are equivalent. | Options 1, 2 and 3 all roughty try to do they same thing: They embed a local variable in a string, sometimes allowing to call a method or access an array offset on that variable. All of these examples are equivalent. | ||
Line 48: | Line 48: | ||
</ | </ | ||
- | Only syntax | + | Only syntax |
<code php> | <code php> | ||
Line 61: | Line 61: | ||
</ | </ | ||
- | Only syntax | + | Only syntax |
<code php> | <code php> | ||
Line 74: | Line 74: | ||
</ | </ | ||
- | ====== Option 4 ====== | + | ==== Option 4 ==== |
PHP has a feature called [[https:// | PHP has a feature called [[https:// | ||
Line 108: | Line 108: | ||
The braces switch from option 3 to 4 because braces are not allowed in option 3. This means '' | The braces switch from option 3 to 4 because braces are not allowed in option 3. This means '' | ||
- | ====== Conclusion | + | ===== Conclusion ===== |
Options 1, 2 and 3 all try to achieve the same thing. Option 1 is less powerful than option 2 but it is shorter so both have some justification for existing. Option 3 is less powerful than both while not being shorter than any of them. Option 4 is not commonly useful. Option 3 and 4 clash syntax-wise. | Options 1, 2 and 3 all try to achieve the same thing. Option 1 is less powerful than option 2 but it is shorter so both have some justification for existing. Option 3 is less powerful than both while not being shorter than any of them. Option 4 is not commonly useful. Option 3 and 4 clash syntax-wise. | ||
Line 130: | Line 130: | ||
As this is a language change, a 2/3 majority is required. | As this is a language change, a 2/3 majority is required. | ||
- | <doodle title=" | + | <doodle title=" |
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
rfc/deprecate_dollar_brace_string_interpolation.txt · Last modified: 2022/05/05 08:17 by ilutov