doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Rewrite and flesh out string interpolation docs

Open Girgias opened this issue 3 years ago • 3 comments

This covers the PHP 8.2.0 deprecation of interpolation It also renames simple to basic and complex to advanced as those don't make a judgement on complexity.

Girgias avatar Nov 12 '22 14:11 Girgias

I spent some more time again, can you please have another look @iluuu1994 @cmb69 ?

Girgias avatar Nov 14 '22 15:11 Girgias

Thank you for the PR!

I'm not convinced that this is a major improvement (but certainly causes quite some work for translators). Wouldn't it be better to have a precise description (like https://github.com/php/php-langspec/blob/master/spec/09-lexical-structure.md#string-literals)?

Having a more precise description would be best, but even that page has a dead link to what it refers to as "simple expression", and we would need to define what a name is somewhere.

Which might be a good idea to have a section on basic language components, because the amount of pages where we redeclare what a label is in PHP is too many.

But this is indeed probably the best course, I'll have another go at it.

Girgias avatar Nov 14 '22 16:11 Girgias

So I've given a go at trying to write a formal definition and removing the clunky descriptions and non-examples.

Girgias avatar Nov 22 '22 14:11 Girgias

Note to self: related to #2078

Girgias avatar Jul 26 '23 16:07 Girgias