Skip to content

Implement arbitrary string interpolation #8256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

iluuu1994
Copy link
Member

Credits to Rowan Tommins (IMSoP) for the syntax suggestion.
@iluuu1994 iluuu1994 added the RFC label Mar 27, 2022
@iluuu1994
Copy link
Member Author

The feedback for this RFC was mostly negative and controversial so I have no immediate plans to pursue this.

@iluuu1994 iluuu1994 closed this Jun 25, 2022
@innocenzi
Copy link

Oh, that's a shame. I was looking forward to a better string interpolation with PHP.

Seems like people on externals.io don't have much consideration for DX... when they suggest sprintf over string interpolation, they forget that it's much more verbose, and while it is indeed more readable in some cases, it's not the case for all cases.

Hopefully we'll still have the feature someday, like multiline short closures.

@iluuu1994
Copy link
Member Author

iluuu1994 commented Jun 26, 2022

I'm afraid that the majority of people will be in one of two camps:

  1. They'll prefer sprintf and co.
  2. They'll like string interpolation but will prefer some other syntax

I don't think a single person apart from Rowan spoke favorably of the RFC. Maybe that's attributable to the participation bias, I don't know.

@toxyy
Copy link

toxyy commented Jul 18, 2025

I have been looking for a way to do this for ages. I would very much appreciate it if you would reconsider opening back up this RFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants