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
=> More informations about this toot | View the thread | More toots from dseguy@phpc.social
=> View php tag | View phptip tag | View phptrick tag This content has been proxied by September (ba2dc).Proxy Information
text/gemini