On 20/03/2022 13:39, Rowan Tommins wrote:
Using a second colon would make ternary expressions slightly awkward; C# handles this by requiring them to be parenthesised, so "{$:( $test ? $x : $y )}" would be valid but "{$:$test ? $x : $y}" would not; we could use some other delimiter, but they'd probably all need something similar.


Thinking about it, a second colon might also cause problems for expressions like "{$: Foo::bar() }", so since we have multiple symbols at the start anyway, how about a prefixed formatting argument, e.g. "{$%10.3f: $x }"

Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to