Toot

Written by dseguy on 2024-12-20 at 15:34

Junior dev: I really really want to use {$a::class} inside a double-quoted #PHP string, but it gives a syntax error!

Me, an intellectual: Hold my beer.

https://php-tips.readthedocs.io/en/latest/tips/no-constant-in-string.html

[#]phptip #phptrick

https://php-tips.readthedocs.io/en/latest/tips/no-constant-in-string.html

=> View attached media

=> More informations about this toot | View the thread | More toots from dseguy@phpc.social

Mentions

Tags

=> View php tag | View phptip tag | View phptrick tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113685879315512442
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
224.058659 milliseconds
Gemini-to-HTML Time
0.552367 milliseconds

This content has been proxied by September (ba2dc).