rfc:arbitrary_expression_interpolation
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:arbitrary_expression_interpolation [2017/09/11 10:51] – created tpunt | rfc:arbitrary_expression_interpolation [2017/12/12 17:09] (current) – tpunt | ||
---|---|---|---|
Line 20: | Line 20: | ||
<code php> | <code php> | ||
$value = 10; | $value = 10; | ||
- | var_dump(" | ||
- | function | + | function |
{ | { | ||
return " | return " | ||
} | } | ||
- | var_dump(" | + | var_dump( |
- | + | " | |
- | `echo #{$value * 5}`, // 50 | + | |
+ | `echo #{$value * 5}` // string(3) "50\n" | ||
+ | ); | ||
echo <<< | echo <<< | ||
- | Result: #{$value * 5} | + | |
- | END; // " | + | END; // " |
</ | </ | ||
+ | |||
+ | ==== Syntax Choice ==== | ||
+ | |||
+ | There were a few different candidates regarding the syntactic choice, including: | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''# | ||
+ | * Sting sigils (such as: '' | ||
+ | |||
+ | Overall, I have chosen the ''# | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
The new syntax will now cause the character sequence ''# | The new syntax will now cause the character sequence ''# | ||
+ | |||
+ | To minimise the BC impact, the ''#'' | ||
+ | |||
+ | The first is by the consuming of the ''#'' | ||
+ | |||
+ | The second is that in the event a regular expression specifies a quantity of ''#'' | ||
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== | ||
- | The next PHP 7.x version (or 8.0, whichever comes next) | + | I have tentatively chosen the next **major** |
===== RFC Impact ===== | ===== RFC Impact ===== | ||
==== To Opcache ==== | ==== To Opcache ==== | ||
- | Still need to be checked. | + | None that I'm aware of. |
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | A simple yes or no for this feature (with a 2/3 +1 majority required). | + | A simple yes or no for this feature (with a 2/3 majority required). |
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/arbitrary_expression_interpolation.1505127080.txt.gz · Last modified: 2017/09/22 13:28 (external edit)