rfc:arbitrary_string_interpolation
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:arbitrary_string_interpolation [2022/03/17 19:15] – ilutov | rfc:arbitrary_string_interpolation [2022/03/27 15:40] – ilutov | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2022-03-17 | * Date: 2022-03-17 | ||
* Author: Ilija Tovilo, tovilo.ilija@gmail.com | * Author: Ilija Tovilo, tovilo.ilija@gmail.com | ||
- | * Status: | + | * Status: |
* Target Version: PHP 8.2 | * Target Version: PHP 8.2 | ||
- | * Implementation: | + | * Implementation: |
===== Proposal ===== | ===== Proposal ===== | ||
Line 16: | Line 16: | ||
* Constants | * Constants | ||
* Class constants | * Class constants | ||
- | * Statis | + | * Static |
<code php> | <code php> | ||
Line 38: | Line 38: | ||
</ | </ | ||
- | The proposed syntax works in double quoted strings (''""'' | + | The proposed syntax works in all cases where existing string interpolation is allowed, namely |
===== Motivation ===== | ===== Motivation ===== | ||
Line 60: | Line 60: | ||
===== Syntax choice ===== | ===== Syntax choice ===== | ||
- | The primary advantage of the syntax ''" | + | The primary advantage of the syntax ''" |
A different syntax could be chosen with a given BC break. | A different syntax could be chosen with a given BC break. | ||
Line 76: | Line 76: | ||
I think this is unfortunate because: | I think this is unfortunate because: | ||
- | * Converting an existing string to '' | + | * Converting an existing string to '' |
- | * The prefix will need to work for all existing string types that allow interpolation (''"'', | + | * The prefix will need to work for all existing string types that allow interpolation (''"'', |
===== Escaping ===== | ===== Escaping ===== |
rfc/arbitrary_string_interpolation.txt · Last modified: 2022/06/25 21:47 by ilutov