On Sun, May 19, 2024 at 1:15 PM Ilija Tovilo <tovilo.il...@gmail.com> wrote:
>
> Hi Peter
>
> On Sun, May 19, 2024 at 10:30 AM Peter Stalman <sarke...@gmail.com> wrote:
> >
> > echo " {A::$static_property} \n"; // doesn't work (unless $static_property 
> > is a variable)
> > echo " {$a::$static_property} \n"; // works
> >
> > echo " {A::static_method()} \n"; // doesn't work (just text)
> > echo " {$a::static_method()} \n"; // works
> >
> > echo " {A::constant} \n"; // doesn't work
> > echo " {$a::constant} \n"; // doesn't work either, but why?
>
> There were also suggestions to extend strings in a more generic way,
> akin to JavaScripts template strings [3], but I didn't have any use
> for this myself.
>
> [3] 
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

What I actually wanted to reference were "tagged templates":

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates

Sorry for the confusion.

Ilija

Reply via email to